import { Link, Outlet, useLocation } from "react-router-dom"; import { ArrowLeft } from "lucide-react"; import { AppMenuTabs } from "./AppMenuTabs"; import { Sidebar, SidebarContent, SidebarHeader, SidebarInset, SidebarRail, useSidebar, } from "@/shared/common/ui/sidebar"; import Top from "@/record-management/components/common/Top"; import { useAuth } from "@/shared/context/AuthContext"; export const AppLayout = () => { const { pathname } = useLocation(); const isAuthPage = pathname === "/"; const { toggleSidebar } = useSidebar(); const { user } = useAuth(); const userRoles = user?.roles?.map((role) => role.key) || []; const isSuperAdmin = userRoles.includes("super_admin"); // Standalone full-page scroll container for the auth screen — the host // chrome is `overflow: hidden`, so this subtree must scroll itself. if (isAuthPage) { return (