// ─── Site sections — i18n-aware ─────────────────────────────
function Filosofie() {
const t = useT();
return (
{t.filosofieEyebrow}
"¡eso!" {t.filosofieTitle1}{' '}
{t.filosofieTitle2}
{t.filosofiePara1}
{t.filosofiePara2}
);
}
function Pijlers() {
const t = useT();
return (
{t.pijlersEyebrow}
{t.pijlersTitle}
{t.pijlersIntro}
{t.pillars.map(([title, tag, items], i) => (
{
e.currentTarget.style.transform = 'translateY(-4px)';
e.currentTarget.style.boxShadow = '0 20px 40px rgba(31,26,23,0.08)';
}} onMouseLeave={(e) => {
e.currentTarget.style.transform = 'none';
e.currentTarget.style.boxShadow = 'none';
}}>
0{i + 1}
{title}
{tag}
{items.map((x) => (
-
{x}
))}
))}
);
}
function Coaches() {
const t = useT();
return (
{t.coachesEyebrow}
{t.coachesTitle}
{t.coachesSubtitle}
{t.coachesData.map(([name, role, initials, face, p1, p2], i) => (
{face ? (
) : (
{initials}
)}
{p1}
{p2}
))}
);
}
function Programma() {
const t = useT();
return (
{t.programmaEyebrow}
{t.programmaTitle1}
{t.programmaTitle2}
{t.programmaIntro}
{t.programmaScheduleLabel}
{t.schedule.map(([d, x, h], i) => (
))}
{t.programmaScheduleNote}
{t.commitmentTitle}
{t.commitmentBody}
);
}
function Testimonial() {
const t = useT();
return (
{t.testimonial}
{t.testimonialAuthor}
);
}
function WatKrijgt() {
const t = useT();
return (
{t.krijgtEyebrow}
{t.krijgtTitle}
{t.krijgtItems.map(([title, body], i) => (
))}
);
}
function OpenClinic() {
const t = useT();
const waHref = `https://wa.me/31617490653?text=${encodeURIComponent(t.waMessage)}`;
return (
{t.clinicEyebrow}
{t.clinicTitle}
{t.clinicLede}
{t.clinicScheduleLabel}
{t.clinicSchedule.map(([time, what], i) => (
{time}
{what}
))}
{t.clinicWhoTitle}
{t.clinicWho.map((x) => (
-
›
{x}
))}
{t.clinicWhatTitle}
{t.clinicWhat.map((x) => (
-
›
{x}
))}
);
}
window.OpenClinic = OpenClinic;
function FAQ() {
const t = useT();
return (
{t.faqEyebrow}
{t.faqTitle}
{t.faqs.map(([q, a], i) => (
))}
);
}
function FAQItem({ q, a, delay = 0 }) {
const [open, setOpen] = React.useState(false);
return (
);
}
function Inschrijven() {
const t = useT();
const [name, setName] = React.useState('');
const [age, setAge] = React.useState('');
const [email, setEmail] = React.useState('');
const [msg, setMsg] = React.useState('');
const [sent, setSent] = React.useState(false);
// Formspree: replace XXXXXXXX with your endpoint id (formspree.io → create form → copy id)
const FORMSPREE_ENDPOINT = 'https://formspree.io/f/XXXXXXXX';
async function submit(e) {
e.preventDefault();
try {
await fetch(FORMSPREE_ENDPOINT, {
method: 'POST',
headers: { 'Accept': 'application/json' },
body: new FormData(e.target),
});
setSent(true);
} catch (err) {
// Fallback to mailto if formspree unreachable
const subject = encodeURIComponent('Gratis intake — ' + (name || 'aanmelding'));
const body = encodeURIComponent(
'Naam talent: ' + name + '\n' +
'Leeftijd: ' + age + '\n' +
'E-mail ouder/voogd: ' + email + '\n\n' +
'Niveau / opmerkingen:\n' + msg
);
window.location.href = 'mailto:coach@esotennis.nl?subject=' + subject + '&body=' + body;
setSent(true);
}
}
return (
{t.inschrijvenEyebrow}
{t.inschrijvenTitle1}
{t.inschrijvenTitle2}
{t.inschrijvenBody}
{t.contactPhone}
06 1749 0653
{t.contactLocation}
{t.locationText}
);
}
const inputStyle = {
width: '100%', padding: '12px 14px',
border: `1px solid ${ESO.rule}`,
background: ESO.cream, color: ESO.ink,
fontFamily: 'Inter, sans-serif', fontSize: 15,
outline: 'none',
transition: 'border 0.15s',
};
function Field({ label, children }) {
return (
);
}
function Footer() {
const t = useT();
return (
);
}
Object.assign(window, {
Filosofie, Pijlers, Coaches, Programma,
Testimonial, WatKrijgt, FAQ, Inschrijven, Footer,
});