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 { Twitter, Instagram, LayoutGrid } from "lucide-react";
import { Outlet } from 'react-router-dom';
import { StyleProvider } from "@/components/ui/StyleProvider";

export default function Layout() {
  const navItems = [
    { name: "Work", href: "#work" },
    { name: "About", href: "#about" },
    { name: "Contact", href: "#contact" },
    { name: "Hero", href: "#hero" },
    { name: "Portfolio", href: "#portfolio" },
    { name: "Metrics", href: "#metrics" },
    { name: "Testimonials", href: "#testimonials" }
  ];

  return (
    <StyleProvider buttonVariant="default" siteBackground="floatingGradient" heroBackground="cornerGlow">
      <SiteBackgroundSlot />
      <SectionErrorBoundary name="navbar">
        <NavbarFloating
          logo="Portfolio"
          ctaButton={{
            text: "Get in Touch",            href: "#contact"}}
          navItems={navItems}
        />
      </SectionErrorBoundary>
      <main className="flex-grow">
        <Outlet />
      </main>
      <SectionErrorBoundary name="footer">
        <FooterMinimal
          brand="Jordan Creative"
          copyright="© 2024 Jordan Creative. All rights reserved."
          socialLinks={[
            { icon: "Twitter", href: "#" },
            { icon: "Instagram", href: "#" },
            { icon: "LayoutGrid", href: "#" },
          ]}
        />
      </SectionErrorBoundary>
    </StyleProvider>
  );
}
