/* Hayes Global Mobility — UI kit: shared page parts */ (function () { const { SectionHeading, Button } = window.HayesGlobalMobilityDesignSystem_489ece; const wrap = { maxWidth: 'var(--container-max)', margin: '0 auto', padding: '0 40px' }; function PageHeader({ eyebrow, title, sub }) { return (
); } function CTABand({ title, sub, ctaLabel = 'Start Your Application', onCta }) { return (

{title}

{sub &&

{sub}

}
); } window.HayesPageHeader = PageHeader; window.HayesCTABand = CTABand; /* ---- Form submission → email ---- Static site: build a prefilled email to the Hayes inbox from the form fields (requires name="" on each field) and open the visitor's mail client. */ const HAYES_EMAIL = 'admin@hayesglobalmobility.com'; const FIELD_LABELS = { fullName: 'Full Name', nationality: 'Nationality', email: 'Email', phone: 'Phone', service: 'Service of Interest', destination: 'Destination', goals: 'Goals / Message', contactConsent: 'Consent to contact', updates: 'Subscribe to updates', }; function hayesSubmit(e, subject) { e.preventDefault(); let lines = []; try { const fd = new FormData(e.target); for (const [k, v] of fd.entries()) { if (v === '' || v == null) continue; lines.push((FIELD_LABELS[k] || k) + ': ' + v); } } catch (err) { /* ignore */ } const body = encodeURIComponent(lines.join('\n') || 'New enquiry from the Hayes Global Mobility website.'); const subj = encodeURIComponent(subject || 'Website Enquiry'); try { window.location.href = 'mailto:' + HAYES_EMAIL + '?subject=' + subj + '&body=' + body; } catch (err) { /* offline */ } } window.HAYES_EMAIL = HAYES_EMAIL; window.hayesSubmit = hayesSubmit; })();