/**
 * Sidebar Enhancement Module
 *
 * Progressive enhancement for server-rendered sidebar HTML.
 * Attaches collapse/expand, keyboard nav, skeleton timeout, and active state
 * management to existing [data-sidebar] elements.
 *
 * Usage:
 *   import { enhance, setActive } from '@countermeasure/web-components/sidebar/enhance'
 *   const sidebar = enhance('[data-sidebar="chat"]')
 *   // sidebar is idempotent — calling again on same element is a no-op
 *
 * Pattern: Sidebar.enhance('[data-sidebar]') — enhances existing HTML, no rendering.
 */
export interface EnhanceOptions {
    /** localStorage key prefix (default: 'sidebar-collapsed') */
    storageKey?: string;
    /** Viewport width below which sidebar is mobile (default: 900) */
    mobileBreakpoint?: number;
    /** Milliseconds before skeleton transitions to empty state (default: 3000) */
    skeletonTimeoutMs?: number;
    /** CSS class for collapsed state (default: 'sidebar--collapsed') */
    collapsedClass?: string;
}
export declare class Sidebar {
    readonly element: HTMLElement;
    private readonly options;
    private readonly variant;
    private readonly cleanupFns;
    private skeletonTimer;
    constructor(element: HTMLElement, options?: EnhanceOptions);
    private init;
    /**
     * Collapse/expand toggle with localStorage persistence.
     */
    private setupCollapse;
    /**
     * Arrow key navigation within sidebar nav items.
     */
    private setupKeyboardNav;
    /**
     * After skeletonTimeoutMs, hide skeleton and show empty state.
     */
    private setupSkeletonTimeout;
    /**
     * Cancel skeleton timeout (call when data arrives before timeout).
     */
    cancelSkeletonTimeout(): void;
    /**
     * Clean up all event listeners and timers.
     */
    destroy(): void;
}
/**
 * Set a nav item as active, removing active from all siblings.
 * Works with both unified .sidebar__item and legacy module-specific classes.
 */
export declare function setActive(item: HTMLElement, activeClass?: string): void;
/**
 * Idempotent enhancement entry point.
 * Returns existing Sidebar instance if element was already enhanced.
 */
export declare function enhance(selector: string, options?: EnhanceOptions): Sidebar | null;
/**
 * Enhance all [data-sidebar] elements on the page.
 * Returns cleanup function that destroys all enhanced sidebars.
 */
export declare function enhanceAll(options?: EnhanceOptions): () => void;
//# sourceMappingURL=enhance.d.ts.map