"use client";

import { AuthProvider } from "@/context/AuthContext";
import { CartProvider } from "@/context/CartContext";
import { ChatWidgetProvider } from "@/context/ChatWidgetContext";
import FloatingChat from "@/components/FloatingChat";

//Wraps the app in all client-side context providers and adds the floating chat button
export default function ClientProviders({ children }) {
  return (
    <AuthProvider>
      <CartProvider>
        <ChatWidgetProvider>
          {children}
          <FloatingChat />
        </ChatWidgetProvider>
      </CartProvider>
    </AuthProvider>
  );
}
