"use client"; import { RiBankLine } from "@remixicon/react"; import Image from "next/image"; import DotIcon from "@/components/dot-icon"; type SelectItemContentProps = { label: string; logo?: string | null; }; const resolveLogoSrc = (logo: string | null) => { if (!logo) { return null; } const fileName = logo.split("/").filter(Boolean).pop() ?? logo; return `/logos/${fileName}`; }; const getBrandLogo = (brand: string): string | null => { const brandMap: Record = { Visa: "visa.png", Mastercard: "mastercard.png", Elo: "elo.png", }; return brandMap[brand] ?? null; }; export function BrandSelectContent({ label }: { label: string }) { const brandLogo = getBrandLogo(label); const logoSrc = brandLogo ? `/logos/${brandLogo}` : null; return ( {logoSrc ? ( {`Logo ) : ( )} {label} ); } export function StatusSelectContent({ label }: { label: string }) { const isActive = label === "Ativo"; return ( {label} ); } export function AccountSelectContent({ label, logo }: SelectItemContentProps) { const logoSrc = resolveLogoSrc(logo); return ( {logoSrc ? ( {`Logo ) : ( )} {label} ); }