// DemoVendas.jsx — auto-looping demo: pipeline orçamento → encomenda → guia → fatura. // O mesmo documento avança quatro estados; o cursor clica "converter" em cada passo. (function () { const STR = { pt: { title: 'Vendas · Obra Quinta dos Álamos', phases: [ { kind: 'Orçamento', num: 'ORC-2026-0231', badge: 'Enviado', cls: 'bg-sky-50 border-sky-200 text-sky-700', btn: 'Converter em encomenda' }, { kind: 'Encomenda', num: 'ENC-2026-0231', badge: 'Confirmada', cls: 'bg-indigo-50 border-indigo-200 text-indigo-700', btn: 'Criar guia de remessa' }, { kind: 'Guia de remessa', num: 'GR 2026/0144', badge: 'Em entrega', cls: 'bg-amber-50 border-amber-200 text-amber-700', btn: 'Emitir fatura' }, { kind: 'Fatura', num: 'FT 2026/0098', badge: 'Emitida · ATCUD', cls: 'bg-emerald-50 border-emerald-200 text-emerald-700', btn: null }, ], steps: [ { label: 'Orçamento', icon: 'file-text' }, { label: 'Encomenda', icon: 'shopping-cart' }, { label: 'Guia', icon: 'truck' }, { label: 'Fatura', icon: 'receipt' }, ], clientLine: 'Construções Santa Cruz, Lda. · 14 artigos', noReentry: 'Sem reintroduzir dados', flowDone: 'Fluxo concluído', toast: 'FT 2026/0098 emitida · enviada ao cliente', }, en: { title: 'Sales · Quinta dos Álamos project', phases: [ { kind: 'Quote', num: 'ORC-2026-0231', badge: 'Sent', cls: 'bg-sky-50 border-sky-200 text-sky-700', btn: 'Convert to order' }, { kind: 'Order', num: 'ENC-2026-0231', badge: 'Confirmed', cls: 'bg-indigo-50 border-indigo-200 text-indigo-700', btn: 'Create delivery note' }, { kind: 'Delivery note', num: 'GR 2026/0144', badge: 'In transit', cls: 'bg-amber-50 border-amber-200 text-amber-700', btn: 'Issue invoice' }, { kind: 'Invoice', num: 'FT 2026/0098', badge: 'Issued · ATCUD', cls: 'bg-emerald-50 border-emerald-200 text-emerald-700', btn: null }, ], steps: [ { label: 'Quote', icon: 'file-text' }, { label: 'Order', icon: 'shopping-cart' }, { label: 'Delivery', icon: 'truck' }, { label: 'Invoice', icon: 'receipt' }, ], clientLine: 'Construções Santa Cruz, Lda. · 14 items', noReentry: 'No data re-entry', flowDone: 'Flow complete', toast: 'FT 2026/0098 issued · sent to the client', }, es: { title: 'Ventas · Obra Quinta dos Álamos', phases: [ { kind: 'Presupuesto', num: 'ORC-2026-0231', badge: 'Enviado', cls: 'bg-sky-50 border-sky-200 text-sky-700', btn: 'Convertir en pedido' }, { kind: 'Pedido', num: 'ENC-2026-0231', badge: 'Confirmado', cls: 'bg-indigo-50 border-indigo-200 text-indigo-700', btn: 'Crear albarán' }, { kind: 'Albarán', num: 'GR 2026/0144', badge: 'En reparto', cls: 'bg-amber-50 border-amber-200 text-amber-700', btn: 'Emitir factura' }, { kind: 'Factura', num: 'FT 2026/0098', badge: 'Emitida · ATCUD', cls: 'bg-emerald-50 border-emerald-200 text-emerald-700', btn: null }, ], steps: [ { label: 'Presupuesto', icon: 'file-text' }, { label: 'Pedido', icon: 'shopping-cart' }, { label: 'Albarán', icon: 'truck' }, { label: 'Factura', icon: 'receipt' }, ], clientLine: 'Construções Santa Cruz, Lda. · 14 artículos', noReentry: 'Sin reintroducir datos', flowDone: 'Flujo completado', toast: 'FT 2026/0098 emitida · enviada al cliente', }, }; const VENDAS_CLICKS = [2600, 5000, 7400]; function VendasStep({ label, icon, state }) { const cls = state === 'done' ? 'border-transparent text-white' : state === 'current' ? 'border-[#4F6EF7] text-[#4F6EF7] bg-white' : 'border-zinc-200 text-zinc-300 bg-white'; return (