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; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SiMenuDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SiMenuDividerDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 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 { /** Menu items to render. Supports legacy and current menu item models. */ readonly items: i0.InputSignal; /** Parameter passed to triggered menu item actions. */ readonly actionParam: i0.InputSignal; private linkActionService; private menuActionService; protected trackItem(index: number, item: MenuItem$1 | MenuItem): string | number; 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; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SiMenuHeaderDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare abstract class SiMenuItemBase { /** Content displayed in the menu item's badge. */ readonly badge: i0.InputSignal; /** * Color variant of the menu item's badge. * * @defaultValue 'secondary' */ readonly badgeColor: i0.InputSignal; /** Icon displayed before the menu item label. */ readonly icon: i0.InputSignal; /** * Whether to show a dot badge on the icon. A string or number is shown as dot content. * * @defaultValue false */ readonly iconBadgeDot: i0.InputSignal; /** * Whether the menu item is disabled. * * @defaultValue false */ readonly disabled: i0.InputSignalWithTransform; protected readonly isInBar: boolean; protected readonly badgeDotHasContent: i0.Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } 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; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SiMenuItemComponent extends SiMenuItemBase { private menuTrigger; protected readonly icons: Record<"elementRight2", string>; protected get hasSubmenu(): boolean; protected get isExpanded(): boolean | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SiMenuItemRadioComponent extends SiMenuItemBase { private cdkMenuItemRadio; protected readonly icons: Record<"elementRecordFilled", string>; protected get checked(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SiMenuModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * 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 };