"use client"; import MoneyValues from "@/components/money-values"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { RiPieChartLine } from "@remixicon/react"; type AnalysisSummaryPanelProps = { totalInstallments: number; totalInvoices: number; grandTotal: number; selectedCount: number; }; export function AnalysisSummaryPanel({ totalInstallments, totalInvoices, grandTotal, selectedCount, }: AnalysisSummaryPanelProps) { const hasInstallments = totalInstallments > 0; const hasInvoices = totalInvoices > 0; return (
Resumo
{/* Total geral */}

Total Selecionado

{selectedCount} {selectedCount === 1 ? "item" : "itens"}

{/* Breakdown */}

Detalhamento

{/* Parcelas */}
Parcelas
{/* Faturas */}
Faturas
{/* Percentuais */} {grandTotal > 0 && (

Distribuição

{hasInstallments && (
Parcelas {((totalInstallments / grandTotal) * 100).toFixed(1)}%
)} {hasInvoices && (
Faturas {((totalInvoices / grandTotal) * 100).toFixed(1)}%
)}
)} {/* Mensagem quando nada está selecionado */} {selectedCount === 0 && (

Selecione parcelas ou faturas para ver o resumo

)} ); }