import FooterMinimal from '@/components/sections/footer/FooterMinimal';
import NavbarFloatingLogo from '@/components/ui/NavbarFloatingLogo';
import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary";
import SiteBackgroundSlot from "@/components/ui/SiteBackgroundSlot";
import { Outlet } from 'react-router-dom';
import { StyleProvider } from "@/components/ui/StyleProvider";

export default function Layout() {
  const navItems = [
    { "name": "Exams", "href": "#calendar" },
    { "name": "Levels", "href": "#levels" },
    { "name": "Demo", "href": "#demo" },
    { "name": "FAQ", "href": "#faq" },
    { "name": "Hero", "href": "#hero" },
    { "name": "Features", "href": "#features" },
    { "name": "Testimonials", "href": "#testimonials" }
  ];

  return (
    <StyleProvider buttonVariant="magnetic" siteBackground="floatingGradient" heroBackground="gradientBars">
      <SiteBackgroundSlot />
      <SectionErrorBoundary name="navbar">
        <NavbarFloatingLogo
          logo="Profi Deutsch"
          logoImageSrc="http://img.b2bpic.net/free-vector/hand-check-mark-logo-business-branding-template-designs-inspiration-isolated-white-background_384344-1465.jpg"
          ctaButton={{
            text: "Register",            href: "#contact"
          }}
          navItems={navItems}
        />
      </SectionErrorBoundary>
      <main className="flex-grow">
        <Outlet />
      </main>
      <SectionErrorBoundary name="footer">
        <FooterMinimal
          brand="© 2026 Profi Deutsch. All rights reserved."
          copyright="Official TELC Uzbekistan Representative."
          socialLinks={[
            { icon: "Instagram", href: "#" },
            { icon: "Send", href: "#" },
          ]}
        />
      </SectionErrorBoundary>
    </StyleProvider>
  );
}
