import FooterBasic from '@/components/sections/footer/FooterBasic';
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": "Features", "href": "#features" },
    { "name": "Products", "href": "#products" },
    { "name": "Pricing", "href": "#pricing" },
    { "name": "Contact", "href": "#contact" },
    { "name": "Hero", "href": "#hero" },
    { "name": "About", "href": "#about" },
    { "name": "Metrics", "href": "#metrics" }
  ];

  return (
    <StyleProvider buttonVariant="bubble" siteBackground="gridLines" heroBackground="lightRaysCorner">
      <SiteBackgroundSlot />
      <SectionErrorBoundary name="navbar">
        <NavbarFloatingLogo
          logo="EduManage"
          logoImageSrc="http://img.b2bpic.net/free-vector/gradient-high-school-logo_23-2149656391.jpg"
          ctaButton={{
            text: "Get Started",            href: "#contact"}}
          navItems={navItems}
        />
      </SectionErrorBoundary>
      <main className="flex-grow">
        <Outlet />
      </main>
      <SectionErrorBoundary name="footer">
        <FooterBasic
          columns={[
            {
              title: "Solutions",              items: [
                { label: "Features", href: "#features" },
                { label: "Analytics", href: "#" },
                { label: "Integration", href: "#" },
              ],
            },
            {
              title: "Company",              items: [
                { label: "About Us", href: "#" },
                { label: "Careers", href: "#" },
                { label: "Privacy Policy", href: "#" },
              ],
            },
            {
              title: "Connect",              items: [
                { label: "Help Center", href: "#" },
                { label: "LinkedIn", href: "#" },
                { label: "Twitter", href: "#" },
              ],
            },
          ]}
          leftText="© 2024 EduManage System."
          rightText="Transforming Education."
        />
      </SectionErrorBoundary>
    </StyleProvider>
  );
}
