import type { Component, Snippet } from 'svelte'; import type { BreadcrumbItem, RoleConfig } from './types.js'; interface Props { /** All available roles. Looked up by `id`. */ roles: RoleConfig[]; /** Currently active role's id. The shell renders that role's config. */ currentRole: string; /** Current pathname (consumer provides; SvelteKit-agnostic). */ currentPath: string; /** Optional: override the shell title; defaults to the current role's label. */ title?: string; /** Optional: override the shell subtitle; defaults to the current role's description. */ subtitle?: string; /** Optional: small uppercase eyebrow label rendered above the title — passes through to `WorkspaceShell`. */ eyebrow?: string; /** Optional: topbar mode label — passes through. */ modeLabel?: string; /** Optional: topbar mode status — passes through. */ modeStatus?: 'active' | 'offline' | 'local-only' | 'attention' | (string & {}); /** Optional: topbar mode detail — passes through. */ modeDetail?: string; /** Optional: sidebar collapsed state — passes through to `WorkspaceShell`. */ collapsed?: boolean; /** Optional: sidebar collapse handler — passes through to `WorkspaceShell`. */ onToggleCollapsed?: () => void; /** Optional: whether the collapse toggle should render — passes through. */ collapsible?: boolean; /** Optional: whether the inspector panel is currently shown — passes through. */ showInspector?: boolean; /** Optional: inspector header label — passes through. */ inspectorTitle?: string; /** Optional: inspector close handler — passes through. */ onCloseInspector?: () => void; /** Optional: brand snippet — passes through to `WorkspaceShell`. When omitted, the default brand renders `role.icon` (if any) alongside the resolved title/subtitle. */ brand?: Snippet; /** Optional: sidebar footer (account menu, tenant switcher) — passes through. */ sidebarFooter?: Snippet; /** Optional: topbar actions — passes through. */ topbarActions?: Snippet; /** Optional: inspector panel — passes through. Inspector content only renders when `showInspector` is also true. */ inspector?: Snippet; /** Optional: inspector rail — passes through. */ inspectorRail?: Snippet; /** Required: main content. */ children: Snippet; /** * Mobile drawer open state — bindable via Svelte 5 `$bindable`. Pass as * `bind:mobileNavOpen={...}` to control externally (e.g. close the drawer * after a route change). Defaults to `false`. */ mobileNavOpen?: boolean; /** Optional: show breadcrumbs (default: true). */ showBreadcrumbs?: boolean; /** * Optional: override the breadcrumb's root crumb. Defaults to * `{ label: role.label, href: '/' + role.id }`. Set this when the shell * is mounted under a prefix (e.g. `/dashboard/[role]/...`, * `/t/:slug/admin`) so the root crumb points at a real route. */ rootCrumb?: BreadcrumbItem; /** * Optional: pathname prefix to skip when auto-walking breadcrumbs. * Forwarded to ``. Defaults to `role.id` * so a pathname like `/super/tenants` doesn't render a duplicate * `Super` crumb alongside the `rootCrumb`. Override when the shell is * mounted under a deeper prefix (e.g. `'dashboard/super'` for * `/dashboard/[role]/...`), or pass an empty string to opt out of the * default skip entirely. */ breadcrumbStartAfter?: string; /** * Optional: icon renderer for `NavItem.icon` values, forwarded to the * inner ``. Pass an icon component (lucide-svelte etc.) when * your nav configs use icon *names* rather than emoji glyphs. */ navIconComponent?: Component<{ name: string; size?: number; }>; /** * Optional: extra side-effect to run after a nav link click. The shell * always closes the mobile drawer on navigation; this callback fires * after that internal close so consumers can layer in analytics, * router-store updates, etc. without losing the drawer behaviour. */ onNavigate?: () => void; } declare const RoleShell: Component; type RoleShell = ReturnType; export default RoleShell; //# sourceMappingURL=RoleShell.svelte.d.ts.map