'use client' import type { WidgetStatus } from '@/lib/dashboard-types' interface WidgetShellProps { title: string subtitle?: string status: WidgetStatus n?: number children: React.ReactNode colSpan?: number /** 'star' resalta la card (borde + fondo distinto) para métricas destacadas. */ variant?: 'star' } export function WidgetShell({ title, subtitle, status, n, children, colSpan = 6, variant }: WidgetShellProps) { return (

{title}

{subtitle &&

{subtitle}

}
{n !== undefined && status === 'ok' && ( n = {n.toLocaleString('es-PY')} )}
{status === 'loading' && (
)} {status === 'suppressed' && (
🔒

Datos insuficientes

Se necesitan al menos 5 respuestas en este corte.

)} {status === 'error' && (

Error al cargar los datos.

)} {status === 'ok' && children}
) }