import { createFileRoute, Outlet } from "@tanstack/react-router"
import { useQuery as useConvexQuery } from "convex/react"
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"
import { Toaster } from "@/components/ui/sonner"
import { DashboardSidebar } from "@/dashboard/dashboard-sidebar"

export const Route = createFileRoute("/_authenticated/_sidebar-layout")({
	component: RouteComponent,
})

function RouteComponent() {
	return (
		<SidebarProvider>
			<div className="flex h-screen w-full">
				<DashboardSidebar />
				<SidebarInset>
					<Outlet />
				</SidebarInset>
			</div>
			<Toaster />
		</SidebarProvider>
	)
}
