// Page components for Hessa Falasi prototype const { useState: useStateP, useEffect: useEffectP, useMemo: useMemoP } = React; function HomePage({ locale, navigate, showToast }) { const t = window.HF_USE_T(locale); const { products, collections } = window.HF_DATA; const featured = products.filter(p => !p.aiRender).slice(0,4); // Hero h1 layout — two stacked phrases const h1 = t("home.heroH1En"); // Active collections (drop seasonal that isn't active) const visibleCollections = collections.filter(c => !c.seasonal || c.active); // Layout: 6/6, then 4/4/4 for visual rhythm const layouts = ["span-7", "span-5", "span-4", "span-4", "span-4"]; return (
{/* HERO */}
{t("home.heroEyebrow")}

{h1[0]}
{h1[1]}

{t("home.heroSub")}

{t("common.bookFitting")} {t("common.explore")}
{locale === "ar" ? "اسحبي" : "Scroll"}
{t("common.since")} {t("common.delivery")}
{/* MANIFESTO */}
{locale === "ar" ? ( <>هسة الفلاسي ليست مجرد لباس — بل أسلوب حياة. ) : ( <>A HESSA FALASI is not just an outfit — it is a mindset. )}
— {locale === "ar" ? "بيان الدار، ٢٠١١" : "House statement, 2011"}
{/* COLLECTIONS */}
{visibleCollections.map((c, i) => ( ))}
{locale === "ar" ? "كل المجموعات" : "All collections"}
{/* HOUSE TEASER */}
{locale==="ar"?"الدار · منذ ٢٠١١":"The House · Since 2011"}

{t("home.houseTitle")}

{t("home.houseBody1")}

{t("home.houseBody2")}

{locale==="ar"?"المؤسِّسة":"Founder"}Hessa Al Falasi
{locale==="ar"?"التأسيس":"Established"}2011, Dubai
{locale==="ar"?"التوقيع":"Signature"}{locale==="ar"?"العباية المطوية":"The folded abaya"}
{locale==="ar"?"الأتيليه":"Atelier"}Dubai Design District, Building 2
{/* FEATURED PIECES */}
{featured.map(p => )}
{/* CREDIBILITY */}
{t("common.featuredLine")}
The National Grazia Middle East About Her Arab News Fashion Forward Dubai

{t("common.stockistsLine")}
Ounass {locale==="ar"?"إضافات بانتظار إذن الشركاء":"Additional partners pending permission"}
{/* APPOINTMENT CTA */}
{locale==="ar"?"التحويل":"How clients book"}

{t("home.apptTitle")}

{t("home.apptBody")}

{t("common.bookFitting")} {t("common.whatsApp")}
); } function CollectionsHubPage({ locale, navigate }) { const t = window.HF_USE_T(locale); const { collections } = window.HF_DATA; const visible = collections.filter(c => !c.seasonal || c.active); const layouts = ["7","5","6","6"]; return (
{locale==="ar"?"المجموعات":"Collections"}

{locale==="ar" ? "أربعة خطوط، صياغة واحدة." : "Four lines, one quiet hand."}

{locale==="ar" ? "تتفرّع الدار إلى أربعة خطوط — أساسية وموسمية — جميعها تُفصّل في أتيليه دبي للتصميم. كل خط يحمل توقيع العباية المطوية بطريقته." : "Four lines extend the house — three evergreen, one seasonal. Every piece is cut in our d3 atelier; each line interprets the folded silhouette in its own register."}

{visible.map((c,i) => ( ))}
); } function CollectionDetailPage({ slug, locale, navigate }) { const t = window.HF_USE_T(locale); const { collections, products } = window.HF_DATA; const collection = collections.find(c => c.slug === slug); const list = products.filter(p => p.collection === slug); const [silhouette, setSilhouette] = useStateP("all"); if (!collection) { return

Collection not found

; } const sils = ["all", ...Array.from(new Set(list.map(p => p.silhouette)))]; const filtered = silhouette === "all" ? list : list.filter(p => p.silhouette === silhouette); return (
{locale==="ar"?"مجموعة":"Collection"} · {String(collections.findIndex(c=>c.slug===slug)+1).padStart(2,"0")}

{collection.name[locale]}

{collection.descriptor[locale]}

{sils.map(s => ( ))}
{filtered.length} {locale==="ar"?"قطعة":(filtered.length===1?"piece":"pieces")}
{filtered.length === 0 ? (

{locale==="ar"?"لا توجد قطع متاحة في هذا التصنيف.":"No pieces in this filter."}

) : (
{filtered.map(p => )}
)}
); } function ProductPage({ handle, locale, navigate, showToast }) { const t = window.HF_USE_T(locale); const { products } = window.HF_DATA; const p = products.find(x => x.handle === handle); const [size, setSize] = useStateP(null); const [activeImg, setActiveImg] = useStateP(0); if (!p) { return

Product not found

; } // Create gallery — main + a few real-photo siblings + same-collection variants const sibs = products.filter(x => x.collection === p.collection && x.handle !== p.handle).slice(0,3); const gallery = [p.image, ...sibs.map(s => s.image)]; const sizes = ["XS","S","M","L","XL"]; const onAdd = () => { if (!size) { showToast(locale==="ar"?"اختاري المقاس أولاً":"Choose a size first"); return; } showToast(locale==="ar"?"أُضيفت إلى الحقيبة — جاري التوجيه إلى الدفع…":"Added to bag — handing off to Shopify checkout…"); }; const waUrl = WA_LINK.replace("styling%20appointment", `styling%20on%20${encodeURIComponent(p.name.en)}`); // cross-sell const cross = products.filter(x => x.handle !== p.handle).slice(0,4); return (
{locale==="ar"?"الدار":"House"} / {p.collection} / {p.name[locale]}
{p.name[locale]}
{gallery.map((g,i) => (
setActiveImg(i)}>
))}
{p.collection.toUpperCase()} · {t(`silhouettes.${p.silhouette}`) || ""}

{p.name[locale]}

{p.priceFrom ? {t("common.from")} : null} {formatAED(p.priceAED)} {p.priceTo ? — {formatAED(p.priceTo)} : null}

{p.story[locale]}

{sizes.map(s => ( ))}
{size ? (
{t("common.selectedSize")}: {size} · {locale==="ar"?"يُمكن تعديل الطول في الموعد الخاص":"length adjusted at private fitting"}
) : null}
{t("common.whatsAppLong")} {locale==="ar"?"احجزي قياساً خاصاً":"Book a private fitting"}
{locale==="ar"?"القماش والصنع":"Fabric & craft"}
{p.fabric[locale]}. {locale==="ar"?"مقصوص في أتيليه دبي للتصميم وملمَّس باليد.":"Cut in our Dubai Design District atelier and finished by hand."}
{locale==="ar"?"المقاس والتفصيل":"Sizing & made-to-measure"}
{locale==="ar"?"يتوفر مقاس قياسي XS–XL مع تعديل الطول مجاناً عند جلسة القياس الخاصة. التفصيل التام متاح بطلب خاص.":"Standard XS–XL with complimentary length adjustment at your private fitting. Full made-to-measure available on request."}
{locale==="ar"?"الشحن والإرجاع":"Delivery & care"}
{locale==="ar"?"يُسلَّم خلال ٧–١٤ يوماً. شحن عالمي. تنظيف جاف فقط، نُوصي بأكياس الحفظ القطنية.":"7–14 days production. Worldwide shipping. Dry-clean only; we recommend cotton garment bags."}
{cross.map(c => )}
); } function HousePage({ locale, navigate }) { const t = window.HF_USE_T(locale); return (
{locale==="ar"?"عن الدار":"The House"}

{locale==="ar"?"هسة الفلاسي — مصمّمة، مؤسِّسة، إماراتية.":"Hessa Al Falasi — designer, founder, Emirati."}

{t("house.sub")}

{locale==="ar"?"البدايات":"The origin"}

{locale==="ar"?"بدأت بتفصيل لنفسها.":"She began by designing for herself."}

{locale==="ar" ? "علّمتها والدتها الأساسيات في صغرها. ثم بدأت تفصّل لنفسها، ثم لأخواتها وصديقاتها، إلى أن أصبح الحديث عن قطعها أكثر من الحديث عن أي شيء آخر. عام ٢٠١١، أطلقت العلامة رسمياً." : "Her mother taught her the fundamentals. She began designing for herself, then for her sisters, then for friends — and when more conversations were about her pieces than about anything else, she made the brand official in 2011."}

{locale==="ar" ? "تصاميمها مستوحاة من تجارب الحياة، الثقافة العربية، وأسفارها — مفرداتها الثابتة هي الأناقة، البساطة، الجودة، والخلود." : "Her work is, in her words, inspired by life experiences, Arabic culture and her travels — the working lexicon of the house remains elegance, simplicity, quality, the timeless."}

{locale==="ar"?"التوقيع":"The signature"}

{locale==="ar"?"العباية المطوية.":"The folded abaya."}

{locale==="ar" ? "وصف الصحفيون توقيعها بـ«العباية المطوية» — قطعة يمكن طيّها، حزمها، تقصيرها على الخصر، وإطلاقها في الأرض كلّه دون أن تفقد هدوءها. هذا السلويت — السلويت المطوي — يبقى العمود الفقري للدار." : "Press calls her signature the folded abaya — a piece that can be folded, belted, cinched at the waist and released at the hem without losing its quiet. That silhouette remains the spine of the house."}

{[ {n:"01", t: locale==="ar"?"القماش":"Fabric", b: locale==="ar"?"الكريب، التول، الدانتيل المغربي، والحبيبات اليدوية.":"Crêpes, tulles, Moroccan lace and hand-set bead lace."}, {n:"02", t: locale==="ar"?"اليد":"By hand", b: locale==="ar"?"تطريز، حلية، وقصّ يدوي في أتيليه d3.":"Embroidery, trim and cutting — all by hand in our d3 atelier."}, {n:"03", t: locale==="ar"?"التفصيل":"Made to measure", b: locale==="ar"?"كل قطعة قابلة للتفصيل أثناء جلسة قياس خاصة — في الأتيليه أو في منزلك.":"Every piece adjustable during a private fitting — atelier or home."} ].map(card => (
{card.n}.

{card.t}

{card.b}

))}
); } function PressPage({ locale }) { const t = window.HF_USE_T(locale); const { press } = window.HF_DATA; return (
{locale==="ar"?"الصحافة":"Press"}

{t("press.title")}

{t("press.sub")}

{press.map((p,i) => ( e.preventDefault()}> {p.year}
{p.outlet}
{p.title[locale]}
))}
{t("press.stockistsTitle")}

Ounass.

{t("press.stockistsBody")}

{t("press.collabsTitle")}

{locale==="ar"?"شراكات مختارة.":"Selected collaborations."}

{t("press.collabsBody")}

{locale==="ar"?"شعارات الشركاء بانتظار تأكيد الإذن من العميلة":"Partner logos withheld pending client permission"}
); } function AppointmentsPage({ locale, showToast }) { const t = window.HF_USE_T(locale); const [apptType, setApptType] = useStateP("atelier"); const [submitted, setSubmitted] = useStateP(false); const [form, setForm] = useStateP({ name:"", phone:"", email:"", collection:"abaya", date:"", notes:"" }); const update = (k) => (e) => setForm({...form, [k]: e.target.value}); const submit = (e) => { e.preventDefault(); setSubmitted(true); showToast(t("appt.thanks")); }; return (
{locale==="ar"?"المواعيد":"Appointments"}

{t("appt.title")}

{t("appt.sub")}

{locale==="ar"?"أو واتساب":"or WhatsApp"}
{submitted ? (
{t("appt.thanks")}

{locale==="ar"?"ستصلكِ رسالة من فريق الأتيليه خلال يوم عمل واحد.":"Our atelier team will reply within one business day."}

) : null}
); } function VisitPage({ locale }) { const t = window.HF_USE_T(locale); return (
{locale==="ar"?"زورونا":"Visit"}

{t("visit.title")}

{t("visit.sub")}

{t("visit.addressLabel")} {t("visit.addressVal")}
{t("visit.hoursLabel")} {t("visit.hoursVal")}
{t("visit.hoursNote")}
{t("visit.contactLabel")} {t("visit.contactVal")}
{t("visit.parkingLabel")} {t("visit.parkingVal")}
{t("visit.directions")} {locale==="ar"?"واتساب":"WhatsApp"}
{/* Stylised map placeholder until coordinates confirmed */}
Building 2 · R07
{t("visit.mapNote")}
); } function SizeGuidePage({ locale }) { const t = window.HF_USE_T(locale); return (
{locale==="ar"?"دليل المقاسات":"Size guide"}

{t("size.title")}

{t("size.sub")}

{t("size.cols").map((c,i)=> )} {t("size.rows").map((row,i) => ( {row.map((cell,j)=> )} ))}
{c}
{cell}
{locale==="ar"?"التفصيل":"Made to measure"}

{locale==="ar"?"كل قطعة قابلة للتعديل.":"Every piece can be tailored."}

{locale==="ar"?"إذا لم تجدي مقاسكِ، تواصلي معنا — التفصيل التام متاح بطلب.":"If you don't find your size, talk to us — full made-to-measure is available on request."}

{t("common.bookFitting")} {t("common.whatsApp")}
); } Object.assign(window, { HomePage, CollectionsHubPage, CollectionDetailPage, ProductPage, HousePage, PressPage, AppointmentsPage, VisitPage, SizeGuidePage });