import { LitElement } from "lit"; import type { CSSResultGroup, PropertyValues } from 'lit'; import { type sizes } from './header.styles.js'; interface MenuItem { label: string; /** Optional click handler for the tab */ clickEvent?: () => void; /** Optional href used to auto-detect the active tab from the current URL */ href?: string; } export declare class Header extends LitElement { static styles: CSSResultGroup; name: string; /** Use a text-based title in the header. */ accessor title: string; /** Optional tagline text shown in the top header bar. */ accessor topTagline: string; /** Optional label for the website link in the top header bar. */ accessor topLinkLabel: string; /** Optional href for the website link in the top header bar. */ accessor topLinkHref: string; /** Display a logo on the left of the header. */ accessor logo: string | URL; /** Add a drawer icon with a click event to e.g. open a sidebar. */ accessor drawer: boolean; /** Array of menu items to include as navigation tabs. */ accessor tabs: MenuItem[]; /** Array of links to include in the drawer. */ accessor drawerLinks: Array<{ label: string; href: string; }>; /** Size of toolbar vertically. */ accessor size: sizes; /** Centre-align navigation tabs instead of the default left alignment. */ accessor tabsCenterAlign: boolean; /** Index of the selected tab. */ accessor selectedTab: number; /** Index of the active tab (0-based). Use this to control which tab is active for any number of tabs. */ accessor activeTabIndex: number; /** Internal state for desktop nav scrolling */ private _navScrollAtStart; private _navScrollAtEnd; /** Bound handler references for cleanup in disconnectedCallback */ private _boundLocationSync; connectedCallback(): Promise; disconnectedCallback(): void; protected firstUpdated(_changed: PropertyValues): void; protected updated(changedProps: Map): void; selectTab(index: number): void; /** Update which nav arrows should be visible/enabled based on scroll position. */ private _updateNavScrollState; /** Scroll the desktop nav horizontally to reveal hidden items. */ private _scrollNav; /** * Match the active tab to the current browser URL. * * Works automatically for: * - htmx navigation (listens for `htmx:pushedIntoHistory` and `popstate`) * - SPA routers (intercepts `history.pushState` / `replaceState`) * - Traditional page loads (runs on `firstUpdated`) * * Host apps can also call this manually after programmatic navigation: * `document.querySelector('hot-header').syncActiveTab();` */ syncActiveTab(): void; /** * Patch `history.pushState` and `history.replaceState` once globally * so that every call dispatches a `hot-locationchange` event. * Safe to call multiple times - the patch is applied only once. */ private static _historyPatched; private static _patchHistory; protected render(): import("lit").TemplateResult<1>; private _tabClick; private _handleTabShow; /** * Should the drawer markup be rendered? * True when `drawer` is explicitly set, or when there are nav tabs * (so mobile users can still navigate via the sidebar). */ private get _showDrawer(); private _handleDrawerOpen; } export default Header;