"use client";

import { ThemeProvider } from "@/contexts/ThemeContext";
import { ReactQueryProvider } from "@/providers/ReactQueryProvider";
import { Toaster } from "react-hot-toast";
import BackgroundPrefetch from "@/components/BackgroundPrefetch";
import TitleGuardian from "@/components/TitleGuardian";

interface ILayoutProps {
  children: React.ReactNode;
}
function Layout({ children }: ILayoutProps) {
  return (
    <ThemeProvider>
      <ReactQueryProvider>
        <TitleGuardian />
        <Toaster />
        <BackgroundPrefetch />
        {children}
      </ReactQueryProvider>
    </ThemeProvider>
  );
}

export default Layout;
