import * as _angular_core from '@angular/core';
import { Signal, ElementRef } from '@angular/core';
import * as i2 from '@acorex/cdk/common';
import { MXInteractiveComponent, AXClickEvent, NXComponent } from '@acorex/cdk/common';
import { AXMenuItem, AXContextMenuItemsClickEvent } from '@acorex/components/menu';
import * as i5 from '@angular/router';
import { UrlTree, IsActiveMatchOptions } from '@angular/router';
import * as i1 from '@angular/common';
import * as i3 from '@acorex/components/loading';
import * as i4 from '@acorex/core/translation';
import * as i6 from '@acorex/components/decorators';

/**
 * DI token for the parent `ax-side-menu`. Child `ax-side-menu-item`s inject this
 * to read shared state (e.g. the current display mode) without creating a
 * circular import on the concrete `AXSideMenuComponent` class.
 */
declare abstract class AXSideMenuBase {
    abstract readonly mode: Signal<'full' | 'compact'>;
}

declare class AXSideMenuItemClickEvent extends AXClickEvent {
    handled: boolean;
}
/** Routes context-menu clicks back to the matching `ax-side-menu-item`. */
interface AXSideMenuContextMenuItemData {
    sideMenuItem: AXSideMenuItemComponent;
}
declare class AXSideMenuItemComponent extends MXInteractiveComponent {
    #private;
    text: _angular_core.ModelSignal<string>;
    active: _angular_core.ModelSignal<boolean>;
    isLoading: _angular_core.ModelSignal<boolean>;
    isCollapsed: _angular_core.ModelSignal<boolean>;
    onClick: _angular_core.OutputEmitterRef<AXSideMenuItemClickEvent>;
    readonly toggleOnClick: _angular_core.InputSignal<boolean>;
    readonly href: _angular_core.InputSignal<string>;
    readonly routerLink: _angular_core.InputSignal<string | any[] | UrlTree>;
    readonly routerLinkActive: _angular_core.InputSignal<string | string[]>;
    readonly routerLinkActiveOptions: _angular_core.InputSignal<{
        exact: boolean;
    } | IsActiveMatchOptions>;
    readonly target: _angular_core.InputSignal<"_blank" | "_self" | "_parent" | "_top">;
    protected menuItemTrigger: _angular_core.Signal<ElementRef<HTMLElement>>;
    protected hasChild: _angular_core.WritableSignal<boolean>;
    protected isCompactMode: _angular_core.Signal<boolean>;
    /** Top-level rail entry in compact mode (opens the flyout context menu). */
    protected isFirstLevel: _angular_core.Signal<boolean>;
    /** Tooltip text for first-level items in compact mode only. */
    protected tooltipContent: _angular_core.Signal<string>;
    private readonly elem;
    private readonly platformId;
    private readonly destroyRef;
    private readonly menuMode;
    private readonly contentLabel;
    private childObserver;
    private childRefreshScheduled;
    private readonly childItems;
    private readonly childrenSlot;
    private readonly childrenContextMenu;
    private get hostElement();
    syncMenuMode(mode: 'full' | 'compact'): void;
    /** Builds the cascading `AXMenuItem` tree used by the compact-mode context menu. */
    buildMenuItemsFromChildren(): AXMenuItem[];
    activateFromContextMenu(nativeEvent: MouseEvent): void;
    toggle(): void;
    open(): void;
    close(): void;
    protected handleContextMenuItemClick(event: AXContextMenuItemsClickEvent): void;
    protected handleContextMenuClosed(): void;
    protected handleClickEvent(e: MouseEvent): void;
    private openCompactContextMenu;
    private getContextMenuAnchorPoint;
    private mapSlotChildrenToMenuItems;
    private toMenuItem;
    private hasNestedChildren;
    /** Direct `ax-side-menu-item` children of `menuHost` (defaults to this item). */
    private getDirectChildElements;
    private reparentOrphanedChildren;
    private scheduleChildRefresh;
    private hasRelevantMutation;
    private nodeListContainsMenuStructuralNode;
    private getItemLabel;
    private getItemIcon;
    private getItemSuffix;
    private getInstanceFromElement;
    private closeSiblingCompactMenus;
    private updateHasChild;
    private updateContentLabel;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXSideMenuItemComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXSideMenuItemComponent, "ax-side-menu-item", never, { "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isCollapsed": { "alias": "isCollapsed"; "required": false; "isSignal": true; }; "toggleOnClick": { "alias": "toggleOnClick"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "routerLinkActive": { "alias": "routerLinkActive"; "required": false; "isSignal": true; }; "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; }, { "text": "textChange"; "active": "activeChange"; "isLoading": "isLoadingChange"; "isCollapsed": "isCollapsedChange"; "onClick": "onClick"; }, ["childItems"], ["ax-title", "ax-side-menu-item, ng-container, [ngTemplateOutlet]", "ax-divider", "ax-prefix", "*", "ax-suffix"], true, never>;
}

type AXSideMenuLook = 'pills' | 'with-line' | 'with-line-color' | 'default';
type AXSideMenuLocation = 'start' | 'end';
/**
 * @category
 * A component for displaying a side menu with customizable content.
 */
declare class AXSideMenuComponent extends NXComponent implements AXSideMenuBase {
    #private;
    items: _angular_core.ModelSignal<AXMenuItem[]>;
    readonly look: _angular_core.InputSignal<AXSideMenuLook>;
    readonly location: _angular_core.InputSignal<AXSideMenuLocation>;
    readonly mode: _angular_core.InputSignal<"full" | "compact">;
    private elementRef;
    /**
     * All `ax-side-menu-item` instances discovered by walking the host DOM.
     *
     * We use DOM discovery (instead of `contentChildren`) because Angular content
     * queries do **not** traverse embedded views created by `ngTemplateOutlet`,
     * and the `AXSideMenuBase` DI token is not reachable from inside those views
     * either (they inherit injection from the template's declaration site, not
     * the insertion site). Walking the DOM works for direct projection,
     * structural directives, and recursive `ngTemplateOutlet`-based templates
     * uniformly.
     */
    private _items;
    /** Read-only signal exposing every discovered `ax-side-menu-item` instance. */
    readonly children: _angular_core.Signal<AXSideMenuItemComponent[]>;
    private platformId;
    private destroyRef;
    hostElement: HTMLElement;
    private domRefreshScheduled;
    private domRefreshObserver;
    /**
     * Walks the host DOM to discover every nested `ax-side-menu-item`, looks up
     * the component instance through the `__axContext__` property that
     * `MXBaseComponent.ngOnInit` attaches to each host element, and updates the
     * internal items signal and `.first-level` CSS class accordingly.
     *
     * Triggered both initially and from a `MutationObserver` so recursive
     * templates that add/remove items at runtime stay in sync.
     */
    private refreshItemsFromDom;
    private scheduleDomRefresh;
    private hasRelevantMenuItemMutation;
    private nodeListContainsMenuItem;
    private addFirstLevelClass;
    /** @ignore */
    private get __hostClass();
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXSideMenuComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXSideMenuComponent, "ax-side-menu", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "location": { "alias": "location"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, { "items": "itemsChange"; }, never, ["ax-side-menu-item,ax-title,ng-container,[ngTemplateOutlet]"], true, never>;
}

declare class AXOutlineSideMenuDirective {
    #private;
    private router;
    private unsubscriber;
    private sideMenu;
    private container;
    private updateSideMenu;
    /**
     * Creates a string signature that represents the tree structure of the menu.
     * Example: "href1(href1.1,href1.2),href2,href3"
     * This will be different for a flat list vs. a nested list.
     */
    private getStructuralSignature;
    private flattenMenuItems;
    private textReplace;
    private buildNestedMenuItems;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXOutlineSideMenuDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXOutlineSideMenuDirective, "[axOutlineSideMenu]", ["axOutlineSideMenu"], {}, {}, never, never, true, never>;
}

declare class AXSideMenuModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXSideMenuModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXSideMenuModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i2.AXRippleDirective, typeof i3.AXLoadingModule, typeof i4.AXTranslationModule, typeof i5.RouterLink, typeof i5.RouterLinkActive, typeof i6.AXDecoratorModule, typeof AXSideMenuComponent, typeof AXSideMenuItemComponent, typeof AXOutlineSideMenuDirective], [typeof AXSideMenuComponent, typeof AXSideMenuItemComponent, typeof AXOutlineSideMenuDirective]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXSideMenuModule>;
}

export { AXOutlineSideMenuDirective, AXSideMenuBase, AXSideMenuComponent, AXSideMenuItemClickEvent, AXSideMenuItemComponent, AXSideMenuModule };
export type { AXSideMenuContextMenuItemData, AXSideMenuLocation, AXSideMenuLook };
