import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import {QueryClient, QueryClientProvider} from "@tanstack/react-query";
import { AuthProvider } from "@/context/auth-context";
import { ChannelSocketProvider } from "@/hooks/use-channel";
import { ThemeProvider } from "next-themes";

const Query = new QueryClient();

createRoot(document.getElementById('root')!).render(
  <StrictMode>
      <QueryClientProvider client={Query}>
          <ThemeProvider defaultTheme="light" attribute="class">
              <AuthProvider>
                  <ChannelSocketProvider>
                      <App />
                  </ChannelSocketProvider>
              </AuthProvider>
          </ThemeProvider>
      </QueryClientProvider>
  </StrictMode>,
)