import { AuthProvider } from "@/contexts/auth-context"
import { SpotifyProvider } from "@/contexts/spotify-context"
import { LinguiProvider } from "@/lib/i18n/provider"
import MantineProvider from "@/lib/mantine/mantine-provider"
//import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
//import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
//import { TanStackDevtools } from '@tanstack/react-devtools'
import { Toaster } from "sonner"

const Providers = ({ children }: { children: React.ReactNode }) => {
  return (
    <LinguiProvider>
      <AuthProvider>
      <SpotifyProvider>
        <MantineProvider>
          {/*<TanStackDevtools
            eventBusConfig={{
              debug: false,
              connectToServerBus: true,
            }}
            plugins={[
              {
                name: 'TanStack Query',
                render: <ReactQueryDevtoolsPanel />,
              },
              {
                name: 'TanStack Router',
                render: <TanStackRouterDevtoolsPanel />,
              }
            ]}
          />*/}
          <Toaster position='top-center' />
          {children}
        </MantineProvider>
      </SpotifyProvider>
      </AuthProvider>
    </LinguiProvider>
  )
}

export default Providers;
