/* global React */ // Slide-over panel: Nueva Recomendación // HU.1.1 (registro), HU.1.2 (clasificación), HU.1.4 (asignación inicial) const { useState: useStateN } = React; function NuevaRecomendacionPanel({ open, onClose, onSave }) { const I = window.Icons; const [step, setStep] = useStateN(1); // ----- Estado del formulario (mock — no se persiste) ----- const [form, setForm] = useStateN({ mecanismo: 'MESICIC', ronda: 'V', idIntl: '', titulo: '', texto: '', eje: '', tipo: 'Normativa', prioridad: 'Alta', capArt: '', archivos: [ { name: 'reporte_MESICIC_RondaV_PRY.pdf', size: '2.4 MB', type: 'pdf' }, ], instituciones: [ { sigla: 'SENAC', rol: 'Líder', plazo: '12 jun 2026' }, ], }); const update = (k, v) => setForm(f => ({ ...f, [k]: v })); if (!open) return null; // Indicador de pasos const steps = [ { n: 1, label: 'Mecanismo y texto' }, { n: 2, label: 'Clasificación' }, { n: 3, label: 'Asignación inicial' }, { n: 4, label: 'Revisión y guardado' }, ]; const progress = (step / steps.length) * 100; return (
); } // ==================================================================== // PASO 1 — Mecanismo, ronda y texto // ==================================================================== function StepMecanismo({ form, update }) { const I = window.Icons; const mecs = [ { id: 'MESICIC', org: 'OEA', desc: 'Mecanismo de Seguimiento de la Convención Interamericana contra la Corrupción' }, { id: 'UNCAC', org: 'ONU', desc: 'United Nations Convention against Corruption' }, { id: 'OCDE', org: 'OCDE', desc: 'Working Group on Bribery in Intl. Business Transactions' }, ]; return ( <>
{mecs.map(m => ( ))}
update('ronda', e.target.value)} placeholder="Ronda V" />
{form.mecanismo.slice(0, 3).toUpperCase()}-{form.ronda.replace(/\s+/g,'')}-•••
update('idIntl', e.target.value)} placeholder="OEA/MESICIC/586" />
update('titulo', e.target.value)} placeholder="Fortalecimiento del régimen de declaración jurada de funcionarios públicos" />