import { cn } from '@/lib/utils'; export const STATUS_PILL_TONES = ['success', 'warning', 'danger', 'primary', 'neutral'] as const; type StatusPillTone = (typeof STATUS_PILL_TONES)[number]; /** * Status de negócio já existentes no backend (Etapas 1–8) → cor semântica * + label em português, resolvidos uma única vez aqui para não repetir * esse mapeamento em cada tela (Etapa 12). */ export const STATUS_PILL_MAP = { pendente: { tone: 'warning', label: 'Pendente' }, pago: { tone: 'success', label: 'Pago' }, atrasado: { tone: 'danger', label: 'Atrasado' }, cancelado: { tone: 'neutral', label: 'Cancelado' }, ativo: { tone: 'success', label: 'Ativo' }, inadimplente: { tone: 'danger', label: 'Inadimplente' }, suspenso: { tone: 'warning', label: 'Suspenso' }, trial: { tone: 'primary', label: 'Trial' }, confirmada: { tone: 'primary', label: 'Confirmada' }, concluida: { tone: 'success', label: 'Concluída' }, orcamento: { tone: 'neutral', label: 'Orçamento' }, cancelada: { tone: 'neutral', label: 'Cancelada' }, } as const satisfies Record; export type BusinessStatus = keyof typeof STATUS_PILL_MAP; const toneClasses: Record = { success: 'bg-success/10 text-success', warning: 'bg-warning/10 text-warning', danger: 'bg-danger/10 text-danger', primary: 'bg-primary/10 text-primary', neutral: 'bg-neutral-500/10 text-neutral-500', }; interface StatusPillProps { status: BusinessStatus; className?: string; } function StatusPill({ status, className }: StatusPillProps) { const config = STATUS_PILL_MAP[status]; return ( {config.label} ); } export { StatusPill };