import FooterSimple from '@/components/sections/footer/FooterSimple';
import NavbarFloating from '@/components/ui/NavbarFloating';
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": "Stack",
    "href": "#stack"
  },
  {
    "name": "Techniques",
    "href": "#techniques"
  },
  {
    "name": "Performance",
    "href": "#performance"
  },
  {
    "name": "Hero",
    "href": "#hero"
  },
  {
    "name": "About",
    "href": "#about"
  },
  {
    "name": "Metrics",
    "href": "#metrics"
  },
  {
    "name": "Testimonials",
    "href": "#testimonials"
  }
];

  return (
    <StyleProvider buttonVariant="arrow" siteBackground="noiseGradient" heroBackground="radialGradient">
      <SiteBackgroundSlot />
      <SectionErrorBoundary name="navbar">
        <NavbarFloating
      logo="CraftCode"
      ctaButton={{
        text: "Start Learning",
        href: "#contact",
      }}
     navItems={navItems} />
      </SectionErrorBoundary>
      <main className="flex-grow">
        <Outlet />
      </main>
      <SectionErrorBoundary name="footer">
        <FooterSimple
      brand="CraftCode"
      columns={[
        {
          title: "Education",
          items: [
            {
              label: "Stack",
              href: "#stack",
            },
            {
              label: "Techniques",
              href: "#techniques",
            },
          ],
        },
        {
          title: "Resources",
          items: [
            {
              label: "Prompts",
              href: "#",
            },
            {
              label: "FAQ",
              href: "#faq",
            },
          ],
        },
        {
          title: "Legal",
          items: [
            {
              label: "Privacy",
              href: "#",
            },
            {
              label: "Terms",
              href: "#",
            },
          ],
        },
      ]}
      copyright="© 2024 CraftCode. All rights reserved."
      links={[
        {
          label: "Twitter",
          href: "#",
        },
        {
          label: "Github",
          href: "#",
        },
      ]}
    />
      </SectionErrorBoundary>
    </StyleProvider>
  );
}
