import FooterBrand from '@/components/sections/footer/FooterBrand';
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: "الرئيسية", href: "#hero" },
    { name: "من نحن", href: "#about" },
    { name: "القائمة", href: "#products" },
    { name: "الأسعار", href: "#pricing" },
    { name: "Features", href: "#features" },
    { name: "Testimonials", href: "#testimonials" },
    { name: "Faq", href: "#faq" }
  ];

  return (
    <StyleProvider buttonVariant="magnetic" siteBackground="floatingGradient" heroBackground="cornerGlow">
      <SiteBackgroundSlot />
      <SectionErrorBoundary name="navbar">
        <NavbarFloatingLogo
          logo="دجاج مقرمش"
          logoImageSrc="http://img.b2bpic.net/free-vector/restaurant-logo-template_23-2150528977.jpg"
          ctaButton={{
            text: "اطلب الآن",            href: "#contact"}}
          navItems={navItems} 
        />
      </SectionErrorBoundary>
      <main className="flex-grow">
        <Outlet />
      </main>
      <SectionErrorBoundary name="footer">
        <FooterBrand
          brand="دجاج مقرمش"
          columns={[
            {
              items: [
                { label: "من نحن", href: "#about" },
                { label: "القائمة", href: "#products" },
              ],
            },
            {
              items: [
                { label: "سياسة الخصوصية", href: "#" },
                { label: "شروط الاستخدام", href: "#" },
              ],
            },
          ]}
        />
      </SectionErrorBoundary>
    </StyleProvider>
  );
}
