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: "Services", href: "#services" },
    { name: "Gallery", href: "#gallery" },
    { name: "About", href: "#about" },
    { name: "Contact", href: "#contact" },
    { name: "Hero", href: "#hero" },
    { name: "Why Us", href: "#why-us" },
    { name: "Testimonials", href: "#testimonials" }
  ];

  return (
    <StyleProvider buttonVariant="stagger" siteBackground="floatingGradient" heroBackground="cornerGlow">
      <SiteBackgroundSlot />
      <SectionErrorBoundary name="navbar">
        <NavbarFloatingLogo
          logo="AquaFlow"
          logoImageSrc="http://img.b2bpic.net/free-vector/logo-unique-luxury-gradient-design-illustration_483537-1044.jpg"
          ctaButton={{
            text: "Get Quote",            href: "#contact"}}
          navItems={navItems}
        />
      </SectionErrorBoundary>
      <main className="flex-grow">
        <Outlet />
      </main>
      <SectionErrorBoundary name="footer">
        <FooterBasic
          columns={[
            {
              title: "Company",              items: [
                { label: "About Us", href: "#about" },
                { label: "Careers", href: "#" },
              ],
            },
            {
              title: "Services",              items: [
                { label: "Emergency", href: "#services" },
                { label: "Maintenance", href: "#services" },
              ],
            },
            {
              title: "Support",              items: [
                { label: "FAQ", href: "#faq" },
                { label: "Contact", href: "#contact" },
              ],
            },
          ]}
          leftText="© 2024 AquaFlow Plumbing. All rights reserved."
          rightText="Professional excellence in every drop."
        />
      </SectionErrorBoundary>
    </StyleProvider>
  );
}
