import { ElementType, ReactNode } from 'react'; /** A primary navigation entry. Permission filtering stays in the app — pass only visible items. */ export type TelescopeNavbarItem = { label: string; href: string; /** Rendered before the label. Supply a sized node, e.g. ``. */ icon?: ReactNode; }; /** An entry in the module launcher (the grid behind the grip button). */ export type TelescopeNavbarModule = { id: string | number; label: string; /** Final destination. Normalize relative paths in the app before passing them in. */ href: string; /** Matched against `activeModuleName` to highlight the current module. */ name?: string; /** Rendered above the label. Supply a sized node, e.g. ``. */ icon?: ReactNode; }; /** An option in the company switcher. */ export type TelescopeNavbarCompany = { id: string; label: string; }; export type TelescopeNavbarProps = { /** Brand slot at the far left, e.g. a logo wrapped in the app's link component. */ brand?: ReactNode; navItems?: TelescopeNavbarItem[]; /** Current route. Compared with `item.href` (exact match) to mark the active entry. */ currentPath?: string; /** Link component for nav items, module cards and the mobile menu. Default `"a"`. */ linkAs?: ElementType; /** * Drops the company switcher from both the desktop bar and the mobile drawer — for an app whose * data is not scoped per company, where an inert switcher would only invite a pointless choice. */ hideCompanySelect?: boolean; companies?: TelescopeNavbarCompany[]; activeCompanyId?: string | null; /** Shows the switcher's loading state while the app swaps the active company. */ isCompanySwitching?: boolean; onCompanyChange?(companyId: string): void; /** Placeholder shown before the company list resolves. Default `"Loading..."`. */ companyPlaceholder?: string; modules?: TelescopeNavbarModule[]; /** `name` of the module this app represents, highlighted in the launcher. */ activeModuleName?: string; /** Shown when the launcher has no modules. Default `"No module"`. */ emptyModulesLabel?: string; userName?: string | null; onLogout?(): void; /** Extra desktop content, rendered between the company switcher and the module launcher. */ endContent?: ReactNode; /** Extra mobile content, rendered at the start of the collapsed top bar. */ mobileEndContent?: ReactNode; classNames?: { /** The sticky outer wrapper. */ base?: string; /** The navbar surface itself (background, radius). */ navbar?: string; /** * The brand region. Sized by its content and never compressed; pin an exact width here * (e.g. `"w-44"`) when logos differ across apps and the nav track should line up anyway. */ brand?: string; /** The scrollable nav track between the brand and the end cluster. */ nav?: string; /** The end cluster (company switcher, `endContent`, module launcher, user menu). */ end?: string; }; }; /** * The Telescope application shell navbar: brand, primary nav, company switcher, module launcher * and user menu, with a mobile drawer below `md`. * * Fully controlled — it holds no router, store or fetch of its own. The app supplies the already * permission-filtered `navItems`, the current path, and the company/module data, and handles * navigation through `linkAs`. * * Layout: the brand and the end cluster keep their initial width and never compress; the nav track * between them takes the remainder and scrolls horizontally once the entries no longer fit, so * adding nav items can never squeeze the company switcher or the user menu. */ export default function TelescopeNavbar({ brand, navItems, currentPath, linkAs, hideCompanySelect, companies, activeCompanyId, isCompanySwitching, onCompanyChange, companyPlaceholder, modules, activeModuleName, emptyModulesLabel, userName, onLogout, endContent, mobileEndContent, classNames, }: TelescopeNavbarProps): import("react").JSX.Element;