import * as _siemens_element_ng_header_dropdown from '@siemens/element-ng/header-dropdown';
import * as _angular_core from '@angular/core';
import { OnChanges, OnInit, OnDestroy, TemplateRef, InjectionToken } from '@angular/core';
import { MenuItem } from '@siemens/element-ng/common';
import { ConnectedPosition } from '@angular/cdk/overlay';
import { Observable } from 'rxjs';

/**
 * Trigger to open dropdowns in a navbar.
 * A dropdown will always be attached to the view, even if not visible.
 *
 * If a dropdown is opened in desktop mode, it will be reattached to an overlay while being opened.
 */
declare class SiHeaderDropdownTriggerDirective implements OnChanges, OnInit, OnDestroy {
    private static idCounter;
    /** Template that be rendered inside the dropdown. */
    readonly dropdown: _angular_core.InputSignal<TemplateRef<unknown>>;
    /** Data that should be passed as template context to the dropdown. */
    readonly dropdownData: _angular_core.InputSignal<unknown>;
    /** Emits whenever a dropdown is opened or closed. */
    readonly openChange: _angular_core.OutputEmitterRef<boolean>;
    private readonly dropdownClose;
    /** Child triggers will set themselves here if they are open. */
    private openSubmenu?;
    private readonly viewContainerRef;
    private readonly elementRef;
    private readonly overlay;
    private readonly parent;
    /** @internal */
    readonly navbar: _siemens_element_ng_header_dropdown.HeaderWithDropdowns | null;
    private readonly injector;
    private viewRef?;
    private portal?;
    private overlayRef?;
    /** @internal */
    readonly level: number;
    private destroying;
    /** @internal */
    readonly id: string;
    protected _isOpen: boolean;
    /** @internal */
    readonly ariaControls: string;
    private headerAnchorComponentRef?;
    /** Whether the dropdown is open. */
    get isOpen(): boolean;
    /** @internal */
    get isOverlay(): boolean;
    ngOnChanges(): void;
    ngOnInit(): void;
    ngOnDestroy(): void;
    /** Opens the dropdown. */
    open(): void;
    /** Closes the dropdown. */
    close(options?: {
        all?: boolean;
    }): void;
    protected click(): void;
    private attachDropdownInline;
    private attachDropdownOverlay;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiHeaderDropdownTriggerDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiHeaderDropdownTriggerDirective, "[siHeaderDropdownTriggerFor]", ["siHeaderDropdownTrigger"], { "dropdown": { "alias": "siHeaderDropdownTriggerFor"; "required": true; "isSignal": true; }; "dropdownData": { "alias": "dropdownData"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; }, never, never, true, never>;
}

/**
 * Wrapper component for {@link SiHeaderDropdownItemComponent}.
 * Must only be opened using an {@link SiHeaderDropdownTriggerDirective}.
 */
declare class SiHeaderDropdownComponent {
    /** @internal */
    protected trigger: SiHeaderDropdownTriggerDirective;
    private readonly focusTrap;
    private previousElement;
    private readonly document;
    private readonly options;
    constructor();
    /** @internal */
    protected get show(): boolean;
    /** @internal */
    protected get overlay(): boolean;
    /** @internal */
    protected get submenu(): boolean;
    /** @internal */
    protected get trapFocus(): boolean;
    /** @internal */
    protected escape(): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiHeaderDropdownComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiHeaderDropdownComponent, "si-header-dropdown", never, {}, {}, never, ["*"], true, never>;
}

/**
 * Creates a dropdown-item. Must be used within an {@link SiHeaderDropdownComponent}.
 */
declare class SiHeaderDropdownItemComponent {
    protected readonly icons: Record<"elementDown2" | "elementOk" | "elementRecordFilled", string>;
    /** Optional icon that will be rendered before the label. */
    readonly icon: _angular_core.InputSignal<string | undefined>;
    /** Badge that is rendered after the label. */
    readonly badge: _angular_core.InputSignal<string | number | undefined>;
    /** Badge (always red) that is attached to the icon. */
    readonly iconBadge: _angular_core.InputSignal<string | number | undefined>;
    /** Color of the badge (not iconBadge). */
    readonly badgeColor: _angular_core.InputSignal<string | undefined>;
    /** Whether the icon is checked with a radio or check mark. */
    readonly checked: _angular_core.InputSignal<"" | "check" | "radio" | undefined>;
    protected readonly ownTrigger: SiHeaderDropdownTriggerDirective | null;
    protected readonly parentTrigger: SiHeaderDropdownTriggerDirective;
    protected readonly navbar: _siemens_element_ng_header_dropdown.HeaderWithDropdowns | null;
    protected click(): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiHeaderDropdownItemComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiHeaderDropdownItemComponent, "si-header-dropdown-item, a[si-header-dropdown-item], button[si-header-dropdown-item]", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "iconBadge": { "alias": "iconBadge"; "required": false; "isSignal": true; }; "badgeColor": { "alias": "badgeColor"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
}

/**
 * A factory to render multiple {@link MenuItem}.
 * Requires a wrapping {@link SiHeaderDropdownComponent}.
 *
 * @internal
 */
declare class SiHeaderDropdownItemsFactoryComponent {
    readonly items: _angular_core.InputSignal<MenuItem[]>;
    readonly activeChange: _angular_core.OutputEmitterRef<boolean>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiHeaderDropdownItemsFactoryComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiHeaderDropdownItemsFactoryComponent, "si-header-dropdown-items-factory", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; }, { "activeChange": "activeChange"; }, never, never, true, never>;
}

/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */

/** @internal */
interface HeaderWithDropdowns {
    /** Called whenever an item is triggered that is not opening another dropdown. */
    onDropdownItemTriggered?(): void;
    /** Whether the dropdown should be opened inline. */
    inlineDropdown?: Observable<boolean>;
    /** The position of the dropdown if opened in an overlay. */
    overlayPosition?: ConnectedPosition[];
    /** Called whenever a dropdown is opened **/
    dropdownOpened?(trigger: SiHeaderDropdownTriggerDirective): void;
    /** Called whenever a dropdown is close **/
    dropdownClosed?(trigger: SiHeaderDropdownTriggerDirective): void;
}
/** @internal */
declare const SI_HEADER_WITH_DROPDOWNS: InjectionToken<HeaderWithDropdowns>;
/**
 * Can be used to pass context-specific options to a header-dropdown
 * that should / or cannot be provided by a consuming application.
 * @internal
 */
interface HeaderDropdownOptions {
    /**
     * If the inline navbar is already wrapped in a focus trap,
     * set this property to prevent the header-dropdown from creating a focus trap.
     */
    disableRootFocusTrapForInlineMode: boolean;
}
/** @internal */
declare const SI_HEADER_DROPDOWN_OPTIONS: InjectionToken<HeaderDropdownOptions>;

export { SI_HEADER_DROPDOWN_OPTIONS, SI_HEADER_WITH_DROPDOWNS, SiHeaderDropdownComponent, SiHeaderDropdownItemComponent, SiHeaderDropdownItemsFactoryComponent, SiHeaderDropdownTriggerDirective };
export type { HeaderDropdownOptions, HeaderWithDropdowns };
