import * as _angular_core from '@angular/core';
import { EventEmitter, TemplateRef, ElementRef, AfterViewInit, QueryList } from '@angular/core';
import { KeyboardSupportItemInterface } from '@fundamental-ngx/cdk/utils';
import { PopoverComponent } from '@fundamental-ngx/core/popover';
import { Subject } from 'rxjs';

declare class UserMenuListItemComponent implements KeyboardSupportItemInterface {
    /** @hidden Event name for child menu item state changes */
    private static readonly STATE_CHANGE_EVENT;
    /** Event emitter for isOpenChange event that controls the submenu popover body */
    readonly isOpenChange: EventEmitter<boolean>;
    /** Event emitter for showSubmenu event */
    showSubmenu: EventEmitter<TemplateRef<any> | null>;
    /** Event emitter for updateTitle event */
    updateTitle: EventEmitter<string | null>;
    /** Event emitter for keyDown event */
    readonly keyDown: _angular_core.OutputEmitterRef<KeyboardEvent>;
    /** Unique id for the menu list item. Default is provided. */
    uniqueId: _angular_core.InputSignal<string>;
    /** Icon name for the menu list item (optional) */
    icon: _angular_core.InputSignal<string | undefined>;
    /** Icon name for the menu list item (optional) */
    iconAfter: _angular_core.InputSignal<string | undefined>;
    /** Whether the icon after is in active state */
    iconAfterActive: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Required text for the menu list item */
    text: _angular_core.InputSignal<string>;
    /** Unique id for the title. Default is provided. */
    textId: _angular_core.InputSignal<string>;
    /** Whether the text should be truncated */
    truncateText: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Subtitle text for the menu list item */
    subtitle: _angular_core.InputSignal<string | undefined>;
    /** Unique id for the subtitle. Default is provided. */
    subtitleId: _angular_core.InputSignal<string>;
    /** Whether the subtitle should be truncated */
    truncateSubtitle: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Whether the item has a submenu */
    hasSubmenu: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Template ref for user menu list item submenu */
    submenu: _angular_core.InputSignal<TemplateRef<any> | null>;
    /** Whether the item is selected */
    selected: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Whether the item's submenu is open */
    isOpen: _angular_core.WritableSignal<boolean>;
    /** Whether the item is in mobile mode */
    mobile: _angular_core.WritableSignal<boolean>;
    /** Reference to the popover */
    popover: _angular_core.Signal<PopoverComponent | undefined>;
    /** @hidden */
    readonly focused: Subject<UserMenuListItemComponent>;
    /** Item's tabindex */
    readonly _tabIndex$: _angular_core.WritableSignal<number | null>;
    /** @hidden */
    readonly _elementRef: ElementRef<any>;
    /** @hidden */
    private readonly _injector;
    /** @hidden */
    private _changeDetectionRef;
    /** @hidden */
    private readonly _destroyRef;
    /** @hidden RTL service for direction detection */
    private readonly _rtlService;
    /** @hidden Computed signal to track RTL state */
    private readonly _isRtl;
    /** @hidden Track whether popover open/close was triggered by keyboard */
    private _keyboardTriggered;
    /** @hidden Timer for delayed close on mouseleave */
    private _hoverCloseTimer;
    /** @hidden Track number of open child submenus */
    private _openChildCount;
    /** @hidden Flag indicating mouse has left the popover and close is pending */
    private _pendingClose;
    /** @hidden Cleanup function for child state listener */
    private _childStateListenerCleanup;
    /** @hidden Grace period in ms before closing submenu on mouseleave */
    private readonly _hoverCloseDelay;
    constructor();
    /** @hidden */
    focusHandler(): void;
    /** @hidden */
    onKeyDown(event: KeyboardEvent): void;
    /** @hidden Handle keyboard in popover body */
    onPopoverBodyKeyDown(event: KeyboardEvent): void;
    /** @hidden Open submenu on host mouseenter (non-mobile only) */
    onHostMouseEnter(): void;
    /** @hidden Schedule submenu close on host mouseleave */
    onHostMouseLeave(): void;
    /** @hidden Cancel close when mouse enters the submenu popover body */
    onSubmenuMouseEnter(): void;
    /** @hidden Schedule close when mouse leaves the submenu popover body */
    onSubmenuMouseLeave(event: MouseEvent): void;
    /** Handles submenu selection in mobile mode */
    onShowDetailsView(): void;
    /** @hidden Support for KeyboardSupportItemInterface */
    click(): void;
    /** @hidden */
    focus(): void;
    /** @hidden */
    isOpenChangeHandle(isOpen: boolean, popover: PopoverComponent): void;
    /** @hidden Notify parent menu item of this item's state change */
    private _notifyParentOfStateChange;
    /** @hidden Setup listener for child menu item state changes */
    private _setupChildStateListener;
    /** @hidden Schedule a delayed close of the submenu popover */
    private _scheduleHoverClose;
    /** @hidden Cancel any pending hover close timer */
    private _cancelHoverCloseTimer;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuListItemComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuListItemComponent, "[fd-user-menu-list-item]", never, { "uniqueId": { "alias": "uniqueId"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconAfter": { "alias": "iconAfter"; "required": false; "isSignal": true; }; "iconAfterActive": { "alias": "iconAfterActive"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": true; "isSignal": true; }; "textId": { "alias": "textId"; "required": false; "isSignal": true; }; "truncateText": { "alias": "truncateText"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "subtitleId": { "alias": "subtitleId"; "required": false; "isSignal": true; }; "truncateSubtitle": { "alias": "truncateSubtitle"; "required": false; "isSignal": true; }; "hasSubmenu": { "alias": "hasSubmenu"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "isOpenChange": "isOpenChange"; "showSubmenu": "showSubmenu"; "updateTitle": "updateTitle"; "keyDown": "keyDown"; }, never, never, true, never>;
}

declare class UserMenuBodyComponent implements AfterViewInit {
    /** @hidden */
    readonly _listItems: QueryList<UserMenuListItemComponent>;
    /**
     * Template ref of the submenu
     */
    submenu: _angular_core.WritableSignal<TemplateRef<any> | null>;
    /**
     * The text of the selected item
     * Needed in mobile mode to update the title in the header
     */
    selectedItemTitle: _angular_core.WritableSignal<string | null>;
    /**
     * Signal indicating whether the user name element is currently visible
     * within the user menu. This updates automatically as the element
     * enters or leaves the viewport.
     *
     * Used by the template to conditionally render the sticky header.
     */
    readonly isUserNameVisible: _angular_core.WritableSignal<boolean>;
    /**
     * Signal storing the HTML content of the user name element.
     * When the original element scrolls out of view, this content
     * is displayed in the sticky header.
     */
    readonly userNameContent: _angular_core.WritableSignal<string>;
    /**
     * Template ref to the header of the user menu body.
     * Needed in mobile mode
     */
    readonly bodyHeader: _angular_core.Signal<TemplateRef<any> | undefined>;
    /**
     * Handle the navigation icon (arrow) of the Back button in RTL mode
     */
    protected readonly navigationArrow: _angular_core.Signal<"navigation-right-arrow" | "navigation-left-arrow">;
    /** @hidden */
    protected readonly userNameEl: _angular_core.Signal<ElementRef<any> | undefined>;
    /** @hidden */
    private readonly _rtlService;
    /** @hidden */
    private readonly _refresh$;
    /** @hidden Track the list item that opened the details view for focus restoration */
    private _triggerItem;
    /** @hidden */
    private readonly _destroyRef;
    /** @hidden */
    onClick(event: MouseEvent): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /**
     * Selects the item and sets the submenu template ref
     */
    selectItem(submenuTpl: TemplateRef<any> | null): void;
    /**
     * Updates the title of the selected item
     */
    updateTitle(title: string | null): void;
    /**
     * Clears the submenu template ref and the selected item title
     * Closes the submenu and returns to the main view
     */
    clearSubmenu(): void;
    /**
     * Closes the dialog in mobile mode
     */
    closeDialog(dialogRef: any): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuBodyComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuBodyComponent, "fd-user-menu-body", never, {}, {}, ["userNameEl", "_listItems"], ["[fd-user-menu-header]", "[fd-user-menu-content-container]"], true, never>;
}

declare class UserMenuControlComponent {
    private el;
    /** Event emitted event when control element is clicked */
    clicked: EventEmitter<void>;
    /** @hidden */
    constructor(el: ElementRef<HTMLElement>);
    /** @hidden */
    onClick(): void;
    /** @hidden */
    focus(): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuControlComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuControlComponent, "fd-user-menu-control", never, {}, { "clicked": "clicked"; }, never, ["*"], true, never>;
}

declare class UserMenuComponent implements AfterViewInit {
    /** Event thrown, when the user menu is opened or closed */
    isOpenChange: _angular_core.OutputEmitterRef<boolean>;
    /** Whether the user menu is in mobile mode */
    mobile: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Whether the user menu is open */
    readonly isOpen: _angular_core.WritableSignal<boolean>;
    /**
     * Signal indicating whether the user name element is currently visible
     * within the user menu. This updates automatically as the element
     * enters or leaves the viewport.
     *
     * Used by the template to conditionally render the sticky header.
     */
    readonly isUserNameVisible: _angular_core.WritableSignal<boolean>;
    /**
     * Signal storing the HTML content of the user name element.
     * When the original element scrolls out of view, this content
     * is displayed in the sticky header.
     */
    readonly userNameContent: _angular_core.WritableSignal<string>;
    /** @hidden */
    protected readonly userMenuControl: _angular_core.Signal<UserMenuControlComponent | undefined>;
    /** @hidden */
    protected readonly userNameEl: _angular_core.Signal<ElementRef<any> | undefined>;
    /** @hidden */
    protected readonly userMenuControlElement: _angular_core.Signal<ElementRef<any> | undefined>;
    /** @hidden */
    protected readonly userMenuBody: _angular_core.Signal<UserMenuBodyComponent | undefined>;
    /** @hidden */
    protected readonly navigationArrow: _angular_core.Signal<"navigation-right-arrow" | "navigation-left-arrow">;
    /** @hidden */
    private readonly _listItems;
    /** @hidden */
    private readonly _rtlService;
    /** @hidden */
    private readonly _dialogService;
    /** @hidden */
    private readonly _changeDetectionRef;
    /** @hidden */
    private readonly _renderer;
    /** @hidden */
    private _dialogRef;
    private readonly _destroyRef;
    /** @hidden */
    constructor();
    /** @hidden */
    ngAfterViewInit(): void;
    /** Method that opens the user menu */
    open(): void;
    /** Method that closes the user menu */
    close(): void;
    /** Method that opens the user menu in dialog (for mobile mode) */
    openDialog(dialogTemplate: TemplateRef<any>): void;
    /** @hidden */
    isOpenChangeHandle(isOpen: boolean): void;
    /** @hidden */
    private _clearSubmenu;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuComponent, "fd-user-menu", never, { "mobile": { "alias": "mobile"; "required": false; "isSignal": true; }; }, { "isOpenChange": "isOpenChange"; }, ["userMenuControl", "userNameEl", "userMenuControlElement", "userMenuBody", "_listItems"], ["fd-user-menu-control", "fd-user-menu-body", "fd-user-menu-footer"], true, never>;
}

declare class UserMenuFooterComponent {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuFooterComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuFooterComponent, "fd-user-menu-footer", never, {}, {}, never, ["*"], true, never>;
}

declare class UserMenuListComponent implements AfterViewInit {
    /** @hidden */
    readonly _listItems: QueryList<UserMenuListItemComponent>;
    /** @hidden */
    private _refresh$;
    /** @hidden */
    private readonly _destroyRef;
    /** @hidden */
    private readonly _keyboardSupportService;
    /** @hidden */
    keyDownHandler(event: KeyboardEvent): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    private _setupInteractionListeners;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuListComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuListComponent, "fd-user-menu-list", never, {}, {}, ["_listItems"], ["*"], true, never>;
}

declare class UserMenuSublistComponent implements AfterViewInit {
    /** @hidden */
    _listItems: QueryList<UserMenuListItemComponent>;
    /** Whether the sublist menu items have icons */
    hasIcons: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** @hidden */
    private _refresh$;
    /** @hidden */
    private readonly _destroyRef;
    /** @hidden */
    private readonly _keyboardSupportService;
    /** @hidden */
    onClick(event: MouseEvent): void;
    /** @hidden */
    keyDownHandler(event: KeyboardEvent): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    private _setupInteractionListeners;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuSublistComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuSublistComponent, "[fd-user-menu-sublist]", never, { "hasIcons": { "alias": "hasIcons"; "required": false; "isSignal": true; }; }, {}, ["_listItems"], ["*"], true, never>;
}

declare class UserMenuContentContainerComponent {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuContentContainerComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuContentContainerComponent, "[fd-user-menu-content-container]", never, {}, {}, never, ["*"], true, never>;
}

declare class UserMenuHeaderContentAreaComponent {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuHeaderContentAreaComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserMenuHeaderContentAreaComponent, "[fd-user-menu-header-content-area]", never, {}, {}, never, ["*"], true, never>;
}

declare class UserMenuHeaderDirective {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuHeaderDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UserMenuHeaderDirective, "[fd-user-menu-header]", never, {}, {}, never, never, true, never>;
}

declare class UserMenuHeaderContainerDirective {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuHeaderContainerDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UserMenuHeaderContainerDirective, "[fd-user-menu-header-container]", never, {}, {}, never, never, true, never>;
}

declare class UserMenuUserNameDirective {
    /** Whether the text should truncate with ellipsis. */
    truncate: _angular_core.InputSignalWithTransform<boolean, unknown>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuUserNameDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UserMenuUserNameDirective, "[fd-user-menu-user-name]", never, { "truncate": { "alias": "truncate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class UserMenuSublineDirective {
    /** Whether the text should truncate with ellipsis. */
    truncate: _angular_core.InputSignalWithTransform<boolean, unknown>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuSublineDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UserMenuSublineDirective, "[fd-user-menu-subline]", never, { "truncate": { "alias": "truncate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class UserMenuControlElementDirective {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuControlElementDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UserMenuControlElementDirective, "[fd-user-menu-control-element]", never, {}, {}, never, never, true, never>;
}

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
declare class UserMenuModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserMenuModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<UserMenuModule, never, [typeof UserMenuComponent, typeof UserMenuControlComponent, typeof UserMenuBodyComponent, typeof UserMenuFooterComponent, typeof UserMenuListComponent, typeof UserMenuSublistComponent, typeof UserMenuListItemComponent, typeof UserMenuContentContainerComponent, typeof UserMenuHeaderContentAreaComponent, typeof UserMenuHeaderDirective, typeof UserMenuHeaderContainerDirective, typeof UserMenuUserNameDirective, typeof UserMenuSublineDirective, typeof UserMenuControlElementDirective], [typeof UserMenuComponent, typeof UserMenuControlComponent, typeof UserMenuBodyComponent, typeof UserMenuFooterComponent, typeof UserMenuListComponent, typeof UserMenuSublistComponent, typeof UserMenuListItemComponent, typeof UserMenuContentContainerComponent, typeof UserMenuHeaderContentAreaComponent, typeof UserMenuHeaderDirective, typeof UserMenuHeaderContainerDirective, typeof UserMenuUserNameDirective, typeof UserMenuSublineDirective, typeof UserMenuControlElementDirective]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<UserMenuModule>;
}

export { UserMenuBodyComponent, UserMenuComponent, UserMenuContentContainerComponent, UserMenuControlComponent, UserMenuControlElementDirective, UserMenuFooterComponent, UserMenuHeaderContainerDirective, UserMenuHeaderContentAreaComponent, UserMenuHeaderDirective, UserMenuListComponent, UserMenuListItemComponent, UserMenuModule, UserMenuSublineDirective, UserMenuSublistComponent, UserMenuUserNameDirective };
