/* global React */
// Haya Yahaly — landing app shell. Mounting happens in index (Haya Yahaly.html).

function App() {
  const { HYNavbar: Navbar, HYHero: Hero, HYFeatures: Features, HYAbout: About, HYTestimonials: Testimonials, HYServices: Services, HYContact: Contact, HYCtaBanner: CtaBanner, HYFooter: Footer, HYFloating: Floating, HYA11yPanel: A11yPanel } = window;
  const [a11y, setA11y] = React.useState(false);

  // (Re)draw lucide icons whenever the DOM changes.
  React.useEffect(() => {
    if (window.lucide) window.lucide.createIcons({ attrs: { 'stroke-width': 1.7 } });
  });

  return (
    <div>
      <Navbar />
      <Hero />
      <Features />
      <About />
      <Testimonials />
      <Services />
      <CtaBanner />
      <Contact />
      <Footer />
      <Floating onA11y={() => setA11y((v) => !v)} />
      <A11yPanel open={a11y} onClose={() => setA11y(false)} />
    </div>
  );
}

window.HYApp = App;
