"use client";

import GlobalSearchOverlay from "@/components/GlobalSearchOverlay";
import MobileSidebarOverlay from "@/components/MobileSidebarOverlay";
import { ReactNode } from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { PostHogProvider } from "@/components/PostHogProvider";

const qc = new QueryClient();

export default function Providers({ children }: { children: ReactNode }) {
  return (
    <PostHogProvider>
      <QueryClientProvider client={qc}>
        {children}
        <GlobalSearchOverlay />
        <MobileSidebarOverlay />
      </QueryClientProvider>
    </PostHogProvider>
  );
}