import * as i0 from '@angular/core';
import * as i1 from '@angular/cdk/menu';
import { MenuItem as MenuItem$1 } from '@siemens/element-ng/common';
import { NavigationExtras } from '@angular/router';
import { TranslatableString } from '@siemens/element-translate-ng/translate-types';

declare class SiMenuBarDirective {
    private menuBar;
    protected get tabIndex(): 0 | -1 | null;
    /**
     * Sets the menu-bar disabled, i.e. sets tabindex="-1"
     */
    readonly disabled: i0.InputSignal<boolean | undefined>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuBarDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SiMenuBarDirective, "si-menu-bar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.CdkMenuBar; inputs: {}; outputs: {}; }, { directive: typeof i1.CdkTargetMenuAim; inputs: {}; outputs: {}; }]>;
}

declare class SiMenuDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SiMenuDirective, "si-menu", never, {}, {}, never, never, true, [{ directive: typeof i1.CdkMenu; inputs: {}; outputs: {}; }, { directive: typeof i1.CdkTargetMenuAim; inputs: {}; outputs: {}; }]>;
}

declare class SiMenuDividerDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuDividerDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SiMenuDividerDirective, "si-menu-divider", never, {}, {}, never, never, true, never>;
}

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

interface MenuItemBase {
    /** ID that will be attached to the DOM node. */
    id?: string;
    /** Label that is shown to the user. */
    label: TranslatableString;
    /** Optional icon that will be rendered before the label. */
    icon?: string;
    /**
     * Badge (always red) that is attached to the icon.
     * If value===true, an empty red dot will be rendered.
     */
    iconBadge?: boolean | number | string;
    /** Badge that is rendered after the label. */
    badge?: string | number;
    /** Color of the badge (not iconBadge). */
    badgeColor?: string;
    /** Whether the menu item id disabled. */
    disabled?: boolean;
}
interface MenuItemGroup extends MenuItemBase {
    type: 'group';
    /** Submenu items for this menu item. */
    children: MenuItem[];
}
interface MenuItemAction extends MenuItemBase {
    type: 'action';
    /**
     * Action that called when the item is triggered.
     * A function will be called, a string will be dispatched to the {@link SiMenuActionService}.
     */
    action: ((actionParam: any, source: this) => void) | string;
}
/**
 * Represents a menu item that navigates using the Angular Router.
 *
 * Requires a configured Angular Router.
 */
interface MenuItemRouterLink extends MenuItemBase {
    type: 'router-link';
    /** Link for the angular router. Accepts the same values as {@link RouterLink}. */
    routerLink: string | any[];
    /** Navigation extras that are passed to the {@link RouterLink}. */
    extras?: NavigationExtras;
}
interface MenuItemLink extends MenuItemBase {
    type: 'link';
    /** The href property of the anchor. */
    href: string;
    /** The target property of the anchor. */
    target?: string;
}
interface MenuItemRadioGroup {
    type: 'radio-group';
    /** Items that are part of the radio group. */
    children: [MenuItemHeader, ...(MenuItemRadio | MenuDivider | MenuItemHeader)[]];
}
interface MenuItemRadio extends MenuItemBase {
    type: 'radio';
    /** Whether the radio is checked. */
    checked: boolean;
    /**
     * Action that called when the item is triggered.
     * A function will be called, a string will be dispatched to the {@link SiMenuActionService}.
     */
    action: ((actionParam: any, source: this) => void) | string;
}
interface MenuItemCheckbox extends MenuItemBase {
    type: 'checkbox';
    /** Whether the checkbox is checked. */
    checked: boolean;
    /**
     * Action that called when the item is triggered.
     * A function will be called, a string will be dispatched to the {@link SiMenuActionService}.
     */
    action: ((actionParam: any, source: this) => void) | string;
}
interface MenuItemHeader {
    type: 'header';
    /** The label of the header. */
    label: string;
}
interface MenuDivider {
    type: 'divider';
}
type MenuItem = MenuItemGroup | MenuItemAction | MenuItemRouterLink | MenuItemLink | MenuItemRadioGroup | MenuItemCheckbox | MenuItemRadio | MenuItemHeader | MenuDivider;

declare class SiMenuFactoryComponent {
    readonly items: i0.InputSignal<readonly (MenuItem$1 | MenuItem)[] | undefined>;
    readonly actionParam: i0.InputSignal<unknown>;
    private linkActionService;
    private menuActionService;
    protected isNewItemStyle(item: MenuItem$1 | MenuItem): item is MenuItem;
    protected isLegacyItemStyle(item: MenuItem$1 | MenuItem): item is MenuItem$1;
    protected radioOrCheckboxTriggered(item: MenuItem$1): void;
    protected runAction(item: MenuItemAction | MenuItemRadio | MenuItemCheckbox): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuFactoryComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SiMenuFactoryComponent, "si-menu-factory", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class SiMenuHeaderDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuHeaderDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SiMenuHeaderDirective, "si-menu-header", never, {}, {}, never, never, true, never>;
}

declare abstract class SiMenuItemBase {
    readonly badge: i0.InputSignal<string | number | undefined>;
    /**
     * @defaultValue 'secondary'
     */
    readonly badgeColor: i0.InputSignal<string>;
    readonly icon: i0.InputSignal<string | undefined>;
    /** @defaultValue false */
    readonly iconBadgeDot: i0.InputSignal<string | number | boolean | undefined>;
    /** @defaultValue false */
    readonly disabled: i0.InputSignalWithTransform<boolean, unknown>;
    protected readonly badgeDotHasContent: i0.Signal<boolean>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuItemBase, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SiMenuItemBase, never, never, { "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "badgeColor": { "alias": "badgeColor"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconBadgeDot": { "alias": "iconBadgeDot"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class SiMenuItemCheckboxComponent extends SiMenuItemBase {
    private cdkMenuItemCheckbox;
    protected readonly icons: Record<"elementOk", string>;
    protected readonly hideCheckmark: boolean;
    protected get checked(): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuItemCheckboxComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SiMenuItemCheckboxComponent, "si-menu-item-checkbox, button[si-menu-item-checkbox]", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkMenuItemCheckbox; inputs: { "cdkMenuItemChecked": "checked"; "cdkMenuItemDisabled": "disabled"; }; outputs: { "cdkMenuItemTriggered": "triggered"; }; }, { directive: typeof i1.CdkMenuTrigger; inputs: {}; outputs: {}; }]>;
}

declare class SiMenuItemComponent extends SiMenuItemBase {
    private menuTrigger;
    protected readonly icons: Record<"elementRight2", string>;
    protected get hasSubmenu(): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuItemComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SiMenuItemComponent, "si-menu-item, a[si-menu-item], button[si-menu-item]", never, {}, {}, never, ["*", ".end"], true, [{ directive: typeof i1.CdkMenuItem; inputs: { "cdkMenuItemDisabled": "disabled"; }; outputs: { "cdkMenuItemTriggered": "triggered"; }; }]>;
}

declare class SiMenuItemRadioComponent extends SiMenuItemBase {
    private cdkMenuItemRadio;
    protected readonly icons: Record<"elementRecordFilled", string>;
    protected get checked(): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuItemRadioComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SiMenuItemRadioComponent, "si-menu-item-radio", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkMenuItemRadio; inputs: { "cdkMenuItemChecked": "checked"; "cdkMenuItemDisabled": "disabled"; }; outputs: { "cdkMenuItemTriggered": "triggered"; }; }, { directive: typeof i1.CdkMenuTrigger; inputs: {}; outputs: {}; }]>;
}

declare class SiMenuModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<SiMenuModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<SiMenuModule, never, [typeof SiMenuBarDirective, typeof SiMenuDirective, typeof SiMenuDividerDirective, typeof SiMenuFactoryComponent, typeof SiMenuHeaderDirective, typeof SiMenuItemCheckboxComponent, typeof SiMenuItemComponent, typeof SiMenuItemRadioComponent], [typeof SiMenuBarDirective, typeof SiMenuDirective, typeof SiMenuDividerDirective, typeof SiMenuFactoryComponent, typeof SiMenuHeaderDirective, typeof SiMenuItemCheckboxComponent, typeof SiMenuItemComponent, typeof SiMenuItemRadioComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<SiMenuModule>;
}

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

/**
 * Implement and provide this to an {@link SiMenuFactoryComponent}
 * to receive trigger events.
 */
declare abstract class SiMenuActionService {
    /** Will be called by {@link SiMenuFactoryComponent} if an action is defined with a string instead of a function. */
    abstract actionTriggered(item: MenuItemAction | MenuItemRadio | MenuItemCheckbox, actionParam?: any): void;
}

export { SiMenuActionService, SiMenuBarDirective, SiMenuDirective, SiMenuDividerDirective, SiMenuFactoryComponent, SiMenuHeaderDirective, SiMenuItemCheckboxComponent, SiMenuItemComponent, SiMenuItemRadioComponent, SiMenuModule };
export type { MenuDivider, MenuItem, MenuItemAction, MenuItemBase, MenuItemCheckbox, MenuItemGroup, MenuItemHeader, MenuItemLink, MenuItemRadio, MenuItemRadioGroup, MenuItemRouterLink };
