// shared/recordatorios-mini.jsx // Mini interactive Recordatorios IA section — used in product pages + home const { useState: rmUs, useRef: rmUr, useEffect: rmUe } = React; // ---- Slack logo inline SVG ---- function RmSlackLogo() { return ( ); } // ---- Mini interactive widget strip ---- function RmMiniWidget({ icon, label, defaultDate, channel, channelType }) { const [dateLabel, setDateLabel] = rmUs(defaultDate || null); const [dropOpen, setDropOpen] = rmUs(false); const [toast, setToast] = rmUs(false); const dropRef = rmUr(); const presets = ['Hoy 12:00', 'Mañana 10:00', 'En 3 días', 'En 7 días', 'En 14 días']; rmUe(() => { const fn = e => { if (dropRef.current && !dropRef.current.contains(e.target)) setDropOpen(false); }; document.addEventListener('mousedown', fn); return () => document.removeEventListener('mousedown', fn); }, []); const schedule = lbl => { setDateLabel(lbl); setDropOpen(false); setToast(true); setTimeout(() => setToast(false), 2200); }; return (
{toast && (
Recordatorio programado
)}
{/* Icon + label */} {label} {/* Date pill */} {dateLabel && ( {dateLabel} setDateLabel(null)} style={{ cursor: 'pointer', opacity: 0.5, marginLeft: 1, lineHeight: 1 }}>× )} {/* Channel */} · {channelType === 'slack' ? {channel} : {channel} } {/* Programar */} | Programar:
{dropOpen && (
{presets.map(p => (
schedule(p)} style={{ padding: '7px 12px', fontSize: 13, cursor: 'pointer', color: 'var(--fg-strong)' }} onMouseEnter={e => e.currentTarget.style.background = 'var(--surface-subtle)'} onMouseLeave={e => e.currentTarget.style.background = '#fff'}> {p}
))}
)}
); } // ---- Mini doc card (header + panel) ---- function RmDocCard({ docLabel, docNumber, client, amount, status, statusColor, statusBg, widget }) { return (
{/* Doc header */}
{docLabel.toUpperCase()}
{docNumber}
{client}
{amount}
{status}
{/* Recordatorios panel */}
Recordatorios IA
{widget}
); } // ---- Full marketing section ---- function RecordatoriosMiniSection({ eyebrow, title, titleAccent, desc, bullets, bg, docProps, widgetProps, accent, ctaHref, flip }) { const textCol = (
{eyebrow || 'RECORDATORIOS IA'}

{title}{titleAccent && <>
{titleAccent}}

{desc}

{bullets.map((b, i) => (
{b}
))}
e.currentTarget.style.opacity = '0.85'} onMouseLeave={e => e.currentTarget.style.opacity = '1'}> Probar gratis
); const demoCol = (
} />
); return (
{flip ? <>{demoCol}{textCol} : <>{textCol}{demoCol}}
); } Object.assign(window, { RecordatoriosMiniSection });