import { Outlet, createRootRouteWithContext } from '@tanstack/react-router'
import type { SupabaseAuthState } from '@/auth/supabase'
import { ThemeProvider } from '@/components/theme-provider'
import type { QueryClient } from '@tanstack/react-query'


interface Context {
  auth: SupabaseAuthState,
  queryClient: QueryClient
}

export const Route = createRootRouteWithContext<Context>()({
  component: () => (
    <>
      <ThemeProvider defaultTheme="light" storageKey="vite-ui-theme">

        <Outlet />
{/*         <TanstackDevtools
          config={{
            position: 'bottom-left',
          }}
          plugins={[
            {
              name: 'Tanstack Router',
              render: <TanStackRouterDevtoolsPanel />,
            },
          ]}
        /> */}
      </ThemeProvider>
    </>
  ),
})
