const WB_SH = window.WhitebirdDesignSystem_7d8137;

/** Tracks a breakpoint from JS, for layout that CSS alone can't switch. */
function useNarrow(width = 1120) {
  const [narrow, setNarrow] = React.useState(() => window.innerWidth <= width);
  React.useEffect(() => {
    const mq = window.matchMedia(`(max-width:${width}px)`);
    const on = (e) => setNarrow(e.matches);
    mq.addEventListener('change', on);
    setNarrow(mq.matches);
    return () => mq.removeEventListener('change', on);
  }, [width]);
  return narrow;
}

/**
 * Stripped header for this build: logo + language switcher only.
 * The nav row and the header "Войти" button were removed on request.
 */
function SiteHeader({ variant }) {
  return null;
}

function SiteFooter() {
  const { Footer } = WB_SH;
  return (
    <Footer variant="light"
      links={[{ label: 'О нас', href: '#' }, { label: 'Комиссии', href: '#' }, { label: 'Документы', href: '#' }, { label: 'Поддержка', href: '#' }]}
      copyright="© 2026 Whitebird. Все права защищены." />
  );
}

Object.assign(window, { SiteHeader, SiteFooter, useNarrow });
