import FooterMinimal from '@/components/sections/footer/FooterMinimal';
import NavbarFloating from '@/components/ui/NavbarFloating';
import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary";
import SiteBackgroundSlot from "@/components/ui/SiteBackgroundSlot";
import { Instagram, Linkedin, Twitter } from "lucide-react";
import { Outlet } from 'react-router-dom';
import { StyleProvider } from "@/components/ui/StyleProvider";

export default function Layout() {
  const navItems = [
  {
    "name": "Home",
    "href": "#hero"
  },
  {
    "name": "Services",
    "href": "#services"
  },
  {
    "name": "Benefits",
    "href": "#benefits"
  },
  {
    "name": "Pricing",
    "href": "#pricing"
  },
  {
    "name": "About",
    "href": "#about"
  },
  {
    "name": "How It Works",
    "href": "#how-it-works"
  },
  {
    "name": "Factory Benefits",
    "href": "#factory-benefits"
  }
];

  return (
    <StyleProvider buttonVariant="magnetic" siteBackground="noise" heroBackground="gradientBars">
      <SiteBackgroundSlot />
      <SectionErrorBoundary name="navbar">
        <NavbarFloating
      logo="MADAR"
      ctaButton={{
        text: "Join Now",
        href: "#contact",
      }}
     navItems={navItems} />
      </SectionErrorBoundary>
      <main className="flex-grow">
        <Outlet />
      </main>
      <SectionErrorBoundary name="footer">
        <FooterMinimal
      brand="MADAR © 2024"
      copyright="All rights reserved. Empowering Saudi Arabia's Industrial Sector."
      socialLinks={[
        {
          icon: Twitter,
          href: "#",
        },
        {
          icon: Linkedin,
          href: "#",
        },
        {
          icon: Instagram,
          href: "#",
        },
      ]}
    />
      </SectionErrorBoundary>
    </StyleProvider>
  );
}
