import React from "react"; import { cn } from "@/lib/utils"; import { formatCurrency } from "@/lib/format-currency"; import { Button } from "./button"; import { Plus } from "lucide-react"; export type AccountCarouselType = "bankAccount" | "credit" | "propertyLoan"; export interface AccountCarouselItem { id: string; name: string; /** Institution name (e.g. "Commonwealth Bank") */ institution: string; balance: number; } export interface AccountListCarouselProps { accounts: AccountCarouselItem[]; type: AccountCarouselType; /** When provided, shows an "Add Account" button at the end (hidden for propertyLoan) */ onAddAccount?: () => void; className?: string; } function AccountCard({ item, isCombined, }: { item: { name: string; institution?: string; balance: number }; isCombined?: boolean; }) { return (
{isCombined ? "All accounts" : item.institution}
{item.name}
{formatCurrency(item.balance)}