(() => {
const NS = window.VakantiehuisplatformDesignSystem_2f09bb;
const { Button, Icon } = NS;
const vhLabel = { fontFamily: 'var(--font-label)', fontSize: 'var(--fs-label)', fontWeight: 'var(--label-weight)', textTransform: 'var(--label-transform)', letterSpacing: 'var(--label-tracking)', color: 'var(--text-2)' };
const I18N = {
  nl: { house: 'Het huis', avail: 'Beschikbaarheid', area: 'Omgeving', reviews: 'Reviews', book: 'Boek direct', price: 'Bekijk prijs', allPhotos: 'Alle foto’s', more: 'Meer over de omgeving' },
  de: { house: 'Das Haus', avail: 'Verfügbarkeit', area: 'Umgebung', reviews: 'Bewertungen', book: 'Direkt buchen', price: 'Preis ansehen', allPhotos: 'Alle Fotos', more: 'Mehr über die Umgebung' },
  en: { house: 'The house', avail: 'Availability', area: 'Area', reviews: 'Reviews', book: 'Book direct', price: 'See price', allPhotos: 'All photos', more: 'More about the area' }
};
const t = (lang, k) => (I18N[lang] || I18N.nl)[k];

function Container({ m, children, style }) {
  return <div style={{ maxWidth: 'var(--container)', margin: '0 auto', padding: m ? '0 var(--gutter-mobile)' : '0 var(--gutter)', boxSizing: 'border-box', ...style }}>{children}</div>;
}
function Section({ m, alt, id, children, style }) {
  return <section id={id} style={{ background: alt ? 'var(--surface-alt)' : 'transparent', padding: m ? '48px 0' : '88px 0', ...style }}><Container m={m}>{children}</Container></section>;
}
function SectionHead({ m, kicker, title, action, children }) {
  return <div style={{ display: 'flex', alignItems: m ? 'flex-start' : 'flex-end', justifyContent: 'space-between', gap: 16, marginBottom: m ? 24 : 40, flexDirection: m ? 'column' : 'row' }}>
    <div style={{ display: 'flex', flexDirection: 'column', gap: 10, maxWidth: 680 }}>
      {kicker && <span style={vhLabel}>{kicker}</span>}
      <h2 style={{ fontSize: m ? 30 : 'var(--fs-h2)' }}>{title}</h2>
      {children && <p style={{ fontSize: m ? 17 : 'var(--fs-lead)', color: 'var(--text-2)' }}>{children}</p>}
    </div>
    {action}
  </div>;
}
function SiteHeader({ m, n, house, lang, setLang, onNav, overlay }) {
  const fg = overlay ? '#fff' : 'var(--text-1)';
  return <header style={{ position: overlay ? 'absolute' : 'relative', top: 0, left: 0, right: 0, zIndex: 10, borderBottom: overlay ? 0 : '1px solid var(--border)', background: overlay ? 'transparent' : 'var(--surface-page)' }}>
    <Container m={m} style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 16, minHeight: m ? 64 : 80 }}>
      <button onClick={() => onNav('home')} style={{ background: 'none', border: 0, padding: 0, color: fg, cursor: 'pointer', whiteSpace: 'nowrap', fontFamily: 'var(--font-display)', fontWeight: 'var(--display-weight)', letterSpacing: 'var(--display-tracking)', fontSize: m ? 20 : 24, minHeight: 44 }}>{house.name}</button>
      {!m && !n && <nav style={{ display: 'flex', gap: 28, color: fg, fontSize: 16, fontWeight: 600, whiteSpace: 'nowrap' }}>
        {[['house', 'home'], ['avail', 'home'], ['area', 'omgeving'], ['reviews', 'home']].map(([k, s]) => <a key={k} onClick={() => onNav(s)} style={{ color: 'inherit', textDecoration: 'none', cursor: 'pointer', padding: '10px 0' }}>{t(lang, k)}</a>)}
      </nav>}
      <div style={{ display: 'flex', alignItems: 'center', gap: m ? 4 : 12 }}>
        <div role="group" aria-label="Taal" style={{ display: 'flex', color: fg }}>
          {['nl', 'de', 'en'].map(l => <button key={l} onClick={() => setLang(l)} aria-pressed={lang === l} style={{ minWidth: 36, minHeight: 44, background: 'none', border: 0, color: 'inherit', cursor: 'pointer', fontSize: 15, fontWeight: lang === l ? 700 : 400, textDecoration: lang === l ? 'underline' : 'none', textUnderlineOffset: 4, textTransform: 'uppercase' }}>{l}</button>)}
        </div>
        {(m || n) && <button aria-label="Menu" style={{ width: 44, height: 44, display: 'grid', placeItems: 'center', background: 'none', border: 0, color: fg }}><Icon name="menu" size={24} /></button>}
        {!m && <Button variant={overlay ? 'inverse' : 'primary'} onClick={() => onNav('boeken')} style={{ whiteSpace: 'nowrap' }}>{t(lang, 'book')}</Button>}
      </div>
    </Container>
  </header>;
}
function SiteFooter({ m, house, lang }) {
  const X = window.VH_I18N.T(lang || 'nl');
  return <><div aria-hidden="true" style={{ height: 'var(--deco-band-h)', background: 'var(--deco-band)' }}></div><footer style={{ background: 'var(--surface-inverse)', color: 'var(--on-inverse)', padding: m ? '48px 0 120px' : '72px 0 40px' }}>
    <Container m={m} style={{ display: 'grid', gridTemplateColumns: m ? '1fr' : '2fr 1fr 1fr 1fr', gap: 32 }}>
      <div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
        <span style={{ fontFamily: 'var(--font-display)', fontWeight: 'var(--display-weight)', fontSize: 26 }}>{house.name}</span>
        <span style={{ fontSize: 16, opacity: .85 }}>{house.address}</span>
        <span style={{ fontSize: 16, opacity: .85 }}>{X.contact}</span>
        <div style={{ display: 'flex', gap: 8, marginTop: 6 }}>{(window.VH_DATA.socials || []).map(x => <a key={x.label} href={x.href || undefined} target="_blank" rel="noopener" aria-label={x.label} style={{ width: 44, height: 44, display: 'grid', placeItems: 'center', borderRadius: 'var(--radius-btn)', border: '1px solid color-mix(in srgb, currentColor 30%, transparent)', color: 'inherit' }}><Icon name={x.icon} size={20} /></a>)}</div>
      </div>
      {X.foot.map(([h, ls]) =>
        <div key={h} style={{ display: 'flex', flexDirection: 'column', gap: 6 }}><strong style={{ fontSize: 16 }}>{h}</strong>{ls.map(l => <a key={l} style={{ color: 'inherit', opacity: .85, fontSize: 16, textDecoration: 'none', padding: '4px 0' }}>{l}</a>)}</div>)}
    </Container>
    <Container m={m} style={{ marginTop: 48, paddingTop: 20, borderTop: '1px solid color-mix(in srgb, currentColor 22%, transparent)', display: 'flex', justifyContent: 'space-between', gap: 12, flexWrap: 'wrap', fontSize: 16, opacity: .8 }}>
      <span>© 2026 {house.name} · {X.reg}</span><span><a href="https://hustahustle.netlify.app" target="_blank" rel="noopener" style={{ color: "inherit" }}>{X.by}</a> · <a href={window.vhS('adminHref', 'eigenaar.html')} style={{ color: "inherit" }}>{X.admin}</a></span>
    </Container>
  </footer></>;
}
Object.assign(window, { VHContainer: Container, VHSection: Section, VHSectionHead: SectionHead, VHHeader: SiteHeader, VHFooter: SiteFooter, vhLabel, vhT: t });
})();
