'use client' import { type LucideIcon } from 'lucide-react' import { Card } from '@/components/ui/card' import { Skeleton } from '@/components/ui/skeleton' import { cn } from '@/lib/utils' export function PageHeader({ title, description, actions, }: { title: string description?: string actions?: React.ReactNode }) { return (

{title}

{description &&

{description}

}
{actions &&
{actions}
}
) } export function KpiCard({ label, value, sub, icon: Icon, delta, tone = 'default', }: { label: string value: React.ReactNode sub?: string icon?: LucideIcon delta?: { value: string; positive: boolean } tone?: 'default' | 'muted' }) { return (

{label}

{value}

{sub &&

{sub}

}
{Icon && (
)}
{delta && (

{delta.value}

)}
) } export function CardSkeletons({ count = 4 }: { count?: number }) { return (
{Array.from({ length: count }).map((_, i) => ( ))}
) } export function EmptyState({ icon: Icon, title, description, action, }: { icon: LucideIcon title: string description?: string action?: React.ReactNode }) { return (

{title}

{description &&

{description}

}
{action}
) } export function StatusDot({ status }: { status: string }) { const map: Record = { active: 'bg-foreground', paid: 'bg-foreground', won: 'bg-foreground', done: 'bg-foreground', approved: 'bg-foreground', pending: 'bg-muted-foreground/60', draft: 'bg-muted-foreground/40', sent: 'bg-muted-foreground/70', planning: 'bg-muted-foreground/60', todo: 'bg-muted-foreground/40', qualified: 'bg-muted-foreground/70', proposal: 'bg-muted-foreground/70', negotiation: 'bg-muted-foreground/80', 'in-progress': 'bg-muted-foreground/80', review: 'bg-muted-foreground/80', suspended: 'bg-muted-foreground/60', expired: 'bg-muted-foreground/40', overdue: 'bg-foreground/80', lost: 'bg-muted-foreground/40', rejected: 'bg-muted-foreground/40', expired_assets: 'bg-muted-foreground/40', expiring: 'bg-foreground/60', cancelled: 'bg-muted-foreground/30', storno: 'bg-muted-foreground/30', } return }