"use client";

import ActiveChecker from "@/components/ActiveChecker";
import AppBackground from "@/components/background/AppBackground";
import CartChecker from "@/components/CartChecker";
import RestaurantHeadManager from "@/components/RestaurantHeadManager";
import RestaurantNotFoundGuard from "@/components/RestaurantNotFoundGuard";
import PreferenceWrapper from "@/components/wrapper/PreferenceWrapper";
import { PatternBackgroundProvider } from "@/components/background/PatternBackgroundProvider";

type Props = {
  children: React.ReactNode;
};

export default function RestaurantLayoutClient({ children }: Props) {
  return (
    <>
      <RestaurantHeadManager />
      <RestaurantNotFoundGuard>
        <PatternBackgroundProvider>
          <PreferenceWrapper>
            <AppBackground />
            {children}
          </PreferenceWrapper>
        </PatternBackgroundProvider>
      </RestaurantNotFoundGuard>
      <CartChecker />
      <ActiveChecker />
    </>
  );
}
