// contact.jsx — Qualified enquiry form + WhatsApp deep-link.
function Contact({ lang, onNav }) {
const ar = lang === 'ar';
const [data, setData] = useState({
firstName: '', lastName: '', email: '', phone: '',
weddingDate: '', venue: '', guests: '', services: [],
budget: '', message: '', heardFrom: '',
});
const [touched, setTouched] = useState(false);
const [sent, setSent] = useState(false);
const update = (k, v) => setData(d => ({ ...d, [k]: v }));
const toggleService = (s) => setData(d => ({
...d, services: d.services.includes(s) ? d.services.filter(x => x !== s) : [...d.services, s]
}));
const required = ['firstName', 'email', 'weddingDate', 'services'];
const isValid = required.every(k => k === 'services' ? data.services.length > 0 : data[k]?.trim?.());
const handleSubmit = (e) => {
e.preventDefault();
setTouched(true);
if (!isValid) return;
// Pre-fill WhatsApp deep link and open it
const msg = `Hi Joelle, I'd love to enquire about our wedding.%0A%0A` +
`Name: ${data.firstName} ${data.lastName}%0A` +
`Email: ${data.email}%0A` +
`Wedding date: ${data.weddingDate}%0A` +
`Venue / area: ${data.venue || 'TBC'}%0A` +
`Guest count: ${data.guests || 'TBC'}%0A` +
`Services: ${data.services.join(', ')}%0A` +
`Budget band: ${data.budget || 'TBC'}%0A%0A` +
`${data.message}`;
window.open(`https://wa.me/971551304916?text=${msg}`, '_blank');
setSent(true);
};
return (
Three faster ways in.
{c.d}
WhatsApp should have opened with your details pre-filled — and I'll have an email in my inbox within the minute. I reply personally, usually within one working day.