// Registration / onboarding — full-bleed editorial intro function RegistroScreen({ onSubmit }) { const T = window.T; const { Icon } = window; const [nombre, setNombre] = React.useState(''); const [zona, setZona] = React.useState(''); const [telefono, setTelefono] = React.useState(''); const [touched, setTouched] = React.useState({}); const [step, setStep] = React.useState(0); // 0 = intro, 1 = form const nombreValid = nombre.trim().split(/\s+/).length >= 2; const telValid = /^0(412|414|416|424|426)\d{7}$/.test(telefono); const zonaValid = !!zona; const canSubmit = nombreValid && telValid && zonaValid; const errs = { nombre: touched.nombre && !nombreValid ? 'Ingresa nombre y apellido' : '', telefono: touched.telefono && !telValid ? 'Formato: 04121234567' : '', zona: touched.zona && !zonaValid ? 'Selecciona una zona' : '', }; const label = (t) => (
{t}
); const inputStyle = (ok) => ({ width: '100%', padding: '14px 16px', borderRadius: 14, border: `1px solid ${ok === false ? T.danger : T.hairline}`, background: T.paper, fontFamily: T.sans, fontSize: 15, color: T.ink, outline: 'none', boxSizing: 'border-box', }); if (step === 0) { // Intro / brand moment return (
{/* accent block */}
{/* content on accent */}
Est. · Venezuela · 2024
Inova
El pedido, como un ritual.
{/* card */}
Para vendedoras
Gestiona catálogos, arma pedidos y envía por WhatsApp. Sin fricción.
{['Esika', "L'Bel", 'Cyzone', '+3'].map((c, i) => (
{c}
))}
); } return (
Tus datos,
una sola vez.
{label('Nombre y apellido')} setNombre(e.target.value)} onBlur={() => setTouched({ ...touched, nombre: true })} placeholder="María Pérez" style={inputStyle(errs.nombre ? false : undefined)} /> {errs.nombre &&
{errs.nombre}
}
{label('Zona de trabajo')}
{window.ZONAS.map(z => ( ))}
{errs.zona &&
{errs.zona}
}
{label('Teléfono')} setTelefono(e.target.value.replace(/\D/g, '').slice(0, 11))} onBlur={() => setTouched({ ...touched, telefono: true })} placeholder="04121234567" inputMode="numeric" style={{ ...inputStyle(errs.telefono ? false : undefined), fontFamily: T.mono, letterSpacing: 1 }} /> {errs.telefono &&
{errs.telefono}
}
canSubmit && onSubmit({ nombre, zona, telefono })} icon={} > Entrar a mi cuenta
); } window.RegistroScreen = RegistroScreen;