import { ApiError } from '../lib/api'; export function errorMessage(error: unknown) { return error instanceof ApiError ? error.message : 'No se pudo completar la operación'; } export function LoadingBlock({ label = 'Cargando…' }: { label?: string }) { return
{label}
; } export function EmptyState({ title, text }: { title: string; text: string }) { return
{title}

{text}

; } export function Alert({ type = 'error', children }: { type?: 'error' | 'success' | 'info'; children: React.ReactNode }) { return
{children}
; }