import { LayoutMain } from '@/pages/auth/modules/BaseHeader';
import { Outlet, createRootRoute } from '@tanstack/react-router'
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
import { Toaster } from '@/components/ui/sonner'
import { AuthProvider } from '@/pages/auth'
import { TooltipProvider } from '@/components/ui/tooltip'
export const Route = createRootRoute({
  component: RootComponent,
})


function RootComponent() {
  return (
    <div className='h-full overflow-hidden'>
      <LayoutMain />
      <AuthProvider mustLogin={true}>
        <TooltipProvider>
          <main className='h-[calc(100%-3rem)] overflow-auto scrollbar'>
            <Outlet />
          </main>
        </TooltipProvider>
      </AuthProvider>
      <TanStackRouterDevtools position="bottom-right" />
      <Toaster />
    </div>
  )
}