/* FlowAnimation — the cinematic 3-step.
Auto-cycles through 3 stages: Dictado → Procesamiento IA → Validación y Firma.
Each stage has its own micro-animation that plays when active.
A "data pulse" travels along the connector between cards. */
function Waveform() {
// 32 bars with randomized animation delays + speeds for a believable audio waveform.
const bars = React.useMemo(() => Array.from({length: 32}, (_,i) => ({
delay: (Math.random() * 1.5).toFixed(2) + "s",
dur: (0.6 + Math.random() * 0.6).toFixed(2) + "s",
})), []);
return (
{bars.map((b, i) => (
))}
);
}
function NeuralNet() {
// Two columns of nodes, with crossing connections. Cyan node in the center column is the "AI core".
const cols = [
[{x:30, y:40},{x:30, y:90},{x:30, y:140}],
[{x:120, y:55, c:true},{x:120, y:125, c:true}],
[{x:210, y:40},{x:210, y:90},{x:210, y:140}],
];
const lines = [];
cols[0].forEach(a => cols[1].forEach(b => lines.push([a,b])));
cols[1].forEach(a => cols[2].forEach(b => lines.push([a,b])));
return (
);
}
function SignedDoc({ active }) {
return (
);
}
function FlowAnimation({ speed = 1 }) {
const [active, setActive] = React.useState(0);
const [tick, setTick] = React.useState(0); // bump to re-trigger animations on same step
React.useEffect(() => {
const dwell = 4800 / speed;
const t = setTimeout(() => {
setActive(a => (a + 1) % 3);
setTick(x => x + 1);
}, dwell);
return () => clearTimeout(t);
}, [active, speed]);
const steps = [
{
key: "dict", num: "01", title: "Carga de hallazgos",
desc: "Dictá los hallazgos clave o cargá tus notas. DeltAi escucha y transcribe en tiempo real.",
cls: "",
},
{
key: "ai", num: "02", title: "Procesamiento IA",
desc: "El modelo radiológico estructura el informe completo: técnica, hallazgos y conclusión jerarquizada.",
cls: "consult",
},
{
key: "sign", num: "03", title: "Validación y firma",
desc: "Revisá y editá si querés. Validá. El informe queda firmado y disponible en RIS/PACS.",
cls: "success",
},
];
return (