import { useState } from "react"; import { Outlet } from "react-router-dom"; import { useLayout } from "@/store/layoutStore"; import { useReminderNotifications } from "@/hooks/useReminderNotifications"; import { Navbar } from "./Navbar"; import { Sidebar, type SidebarVariant } from "./Sidebar"; import { HorizontalNav } from "./HorizontalNav"; function sidebarVariant(layout: string): SidebarVariant { if (layout === "compact") return "compact"; if (layout === "wide") return "wide"; return "default"; } function mainClass(layout: string): string { const base = "mx-auto w-full flex-1 px-4 py-6 sm:px-6 sm:py-8"; if (layout === "topnav") return `${base} max-w-7xl`; return `${base} max-w-6xl`; } export function AppLayout() { const [sidebarOpen, setSidebarOpen] = useState(false); const { layout } = useLayout(); useReminderNotifications(); if (layout === "topnav") { return (