(ns auto-ap.ssr.components.bank-account-icon 
  (:require [auto-ap.ssr.hiccup-helper :as hh]
            [auto-ap.ssr.svg :as svg]))

(defmulti icon :bank-account/type)
(defmethod icon :bank-account-type/cash [_]
  [:div.grow-0.flex.flex-col.justify-center
   [:div.p-1.m-2.rounded-full
    {:class
     "bg-blue-50"}
    [:div {:class
           (hh/add-class "p-1.5 w-8 h-8" "text-green-600")}
     svg/dollar]]])

(defmethod icon :bank-account-type/credit [_]
  [:div.grow-0.flex.flex-col.justify-center
   [:div.p-1.m-2.rounded-full
    {:class
     "bg-purple-50"}
    [:div {:class
           (hh/add-class "p-1.5 w-8 h-8" "text-purple-600")}
     svg/credit-card]]])

(defmethod icon :bank-account-type/check [_]
  [:div.grow-0.flex.flex-col.justify-center
   [:div.p-1.m-2.rounded-full
    {:class
     "bg-blue-50"}
    [:div {:class
           (hh/add-class "p-1.5 w-8 h-8" "text-blue-600")}
     svg/check]]])