);
};
const Footer = ({ setPage }) => (
);
const WhatsAppFab = () => (
Chat on WhatsApp
);
const PriceBlock = ({ p }) => (
{p.line && (p.line === "Bridal" || p.line === "Couture") && p.category !== "couture"
? "On request"
: aed(p.price)}
);
const ProductCard = ({ p, onOpen }) => (
onOpen && onOpen(p)}>
{p.code}
{p.name}
{aed(p.price)}
Details →
);
const Eyebrow = ({ children, num }) => (
{num && {num}}
{children}
);
const SectionHead = ({ eyebrow, title, sub, align = "left" }) => (
{eyebrow && {eyebrow}}
{title}
{sub && {sub}
}
);
// Quick-view modal — opens from any ProductCard
const ProductModal = ({ p, onClose, setPage }) => {
React.useEffect(() => {
if (!p) return;
const k = (e) => e.key === "Escape" && onClose();
window.addEventListener("keydown", k);
const prev = document.body.style.overflow;
document.body.style.overflow = "hidden";
return () => { window.removeEventListener("keydown", k); document.body.style.overflow = prev; };
}, [p]);
if (!p) return null;
const isCouture = p.category === "couture" || p.category === "bridal";
return (
e.stopPropagation()}>
{p.line} · {p.code}
{p.name}
{p.fabric}
{aed(p.price)}
- OriginDubai atelier
- Made to order4–8 weeks
- FittingBy appointment
- CareAtelier dry-clean only
{!isCouture &&
}
Enquire on WhatsApp
{isCouture && (
)}
Couture pieces are made to measure at our Dubai Design District atelier. Begin with a personal consultation.
);
};
// Appointment / contact form (validates, submits to a fake handler, persists to localStorage)
const AppointmentForm = ({ context = "Appointment", compact = false }) => {
const [data, setData] = React.useState({
name: "", email: "", phone: "", date: "", occasion: "Bridal", message: ""
});
const [errors, setErrors] = React.useState({});
const [sent, setSent] = React.useState(false);
const validate = () => {
const e = {};
if (!data.name.trim()) e.name = "Please tell us your name.";
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(data.email)) e.email = "Enter a valid email.";
if (!data.phone.trim() || data.phone.replace(/\D/g, "").length < 7) e.phone = "Enter a contact number.";
if (!data.date) e.date = "Choose a preferred date.";
setErrors(e);
return Object.keys(e).length === 0;
};
const submit = (ev) => {
ev.preventDefault();
if (!validate()) return;
// Stash a record locally to feel real
const all = JSON.parse(localStorage.getItem("mo_appts") || "[]");
all.push({ ...data, context, at: new Date().toISOString() });
localStorage.setItem("mo_appts", JSON.stringify(all));
setSent(true);
};
if (sent) return (
Thank you
Your request is with the atelier.
Our team will reach out within one business day to confirm your appointment.
For anything urgent, reach us on WhatsApp {CONTACT.whatsappPretty}.
Open WhatsApp
);
const fld = (key, label, type="text", extra={}) => (
);
return (
);
};
Object.assign(window, { Wordmark, Navbar, Footer, WhatsAppFab, PriceBlock, ProductCard, Eyebrow, SectionHead, ProductModal, AppointmentForm });