// Onboarding, splash, phone-OTP auth screens // ─── Splash ─────────────────────────────────────────────────────────── function SplashScreen({ theme, lang }) { const T = theme; const l = L[lang]; const nav = useNav(); return (
nav?.nav('onb1')} style={{ position: 'absolute', inset: 0, background: `radial-gradient(120% 80% at 50% 0%, ${T.camel} 0%, ${T.camelDeep} 55%, ${T.pastelBrown} 100%)`, cursor: 'pointer', }}/>
{l.appName}
{l.tagline}
{/* Footer ornament */}
DUYUF · 2024
); } // ─── Onboarding (3 slides shown together) ───────────────────────────── function OnboardingScreen({ theme, lang, step = 1 }) { const T = theme; const l = L[lang]; const rtl = isRTL(lang); const nav = useNav(); // If used by router (no explicit step prop), read from route name if (nav && nav.route && nav.route.startsWith('onb')) step = parseInt(nav.route.slice(3), 10) || step; const slides = [ { title: l.onb1Title, body: l.onb1Body, tone: 'camel', icon: 'kaaba' }, { title: l.onb2Title, body: l.onb2Body, tone: 'cream', icon: 'bed' }, { title: l.onb3Title, body: l.onb3Body, tone: 'brown', icon: 'compass' }, ]; const s = slides[step - 1]; return (
nav?.nav('home')} style={{ color: T.textMuted, fontSize: 13, fontWeight: 500, cursor: 'pointer' }}>{l.skip}

{s.title}

{s.body}

{/* Dots */}
{[1,2,3].map(i => (
))}
); } // ─── Phone OTP — number entry ───────────────────────────────────────── function PhoneAuthScreen({ theme, lang }) { const T = theme; const l = L[lang]; const rtl = isRTL(lang); const nav = useNav(); return (

{rtl ? 'سجّل الدخول بهاتفك' : 'Sign in with your phone'}

{rtl ? 'سنرسل لك رمز التحقق عبر رسالة نصية' : "We'll send you a verification code by SMS"}

🇸🇦 +966
5•• ••• •••

{rtl ? 'بالمتابعة، أنت توافق على الشروط وسياسة الخصوصية' : 'By continuing you agree to the Terms & Privacy Policy'}

{/* Divider */}
{rtl ? 'أو' : 'or'}
{/* Guest mode */}

{rtl ? 'ستحتاج تسجيل الدخول قبل إتمام أي حجز' : "You'll sign in before completing any booking"}

); } // ─── OTP entry ──────────────────────────────────────────────────────── function OTPScreen({ theme, lang }) { const T = theme; const l = L[lang]; const rtl = isRTL(lang); const nav = useNav(); const digits = ['5', '8', '2', '', '', '']; return (

{rtl ? 'أدخل رمز التحقق' : 'Enter the code'}

{rtl ? 'أُرسل إلى +966 5•• ••• 412' : 'Sent to +966 5•• ••• 412'}

{digits.map((d, i) => (
{d}
))}

{rtl ? 'إعادة إرسال الرمز خلال' : 'Resend code in'} 00:42

{/* Keypad */}
{['1','2','3','4','5','6','7','8','9','','0','⌫'].map((k, i) => (
k && k !== '⌫' && nav?.nav('home')} style={{ height: 48, borderRadius: 12, background: k && k !== '⌫' ? T.surface : (k === '⌫' ? 'transparent' : 'transparent'), display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: 'Alexandria', fontSize: 22, fontWeight: 500, color: T.text, border: k && k !== '⌫' ? `1px solid ${T.hairline}` : 'none', cursor: k ? 'pointer' : 'default', }}>{k}
))}
); } Object.assign(window, { SplashScreen, OnboardingScreen, PhoneAuthScreen, OTPScreen });