import { RiBarcodeLine, RiCheckboxCircleLine, RiHourglass2Line, RiWallet3Line, } from "@remixicon/react"; import { buildBillStatusLabel } from "@/features/dashboard/bills/bills-helpers"; import { EstablishmentLogo } from "@/shared/components/entity-avatar"; import MoneyValues from "@/shared/components/money-values"; import { CardContent } from "@/shared/components/ui/card"; import { Progress } from "@/shared/components/ui/progress"; import { Separator } from "@/shared/components/ui/separator"; import { WidgetEmptyState } from "@/shared/components/widgets/widget-empty-state"; import type { PayerBoletoItem, PayerPaymentStatusData, } from "@/shared/lib/payers/details"; import { cn } from "@/shared/utils/ui"; // --- PayerBoletoCard --- type PayerBoletoCardProps = { items: PayerBoletoItem[]; }; export function PayerBoletoCard({ items }: PayerBoletoCardProps) { if (items.length === 0) { return ( } title="Nenhum boleto cadastrado para o período" description="Quando houver lançamentos registrados com boleto, eles aparecerão aqui." /> ); } return ( ); } // --- PayerPaymentStatusCard --- type PayerPaymentStatusCardProps = { data: PayerPaymentStatusData; }; export function PayerPaymentStatusCard({ data }: PayerPaymentStatusCardProps) { const { paidAmount, paidCount, pendingAmount, pendingCount, totalAmount } = data; if (totalAmount === 0) { return ( } title="Nenhuma despesa no período" description="Registre lançamentos para visualizar o status de pagamento." /> ); } const paidPercentage = (paidAmount / totalAmount) * 100; return (
Pago
({paidCount} registro{paidCount !== 1 ? "s" : ""})
Pendente
({pendingCount} registro{pendingCount !== 1 ? "s" : ""})
); }