import * as i0 from '@angular/core';
import { input, booleanAttribute, output, HostBinding, ViewEncapsulation, Component } from '@angular/core';
import * as i1 from '@eui/components/eui-menu';
import { EUI_MENU } from '@eui/components/eui-menu';

/**
 * @description
 * A sidebar menu component that wraps the EUI menu component.
 * This component provides a collapsible sidebar navigation menu with various display options.
 *
 * @usageNotes
 * ### Basic usage
 * ```typescript
 * menuItems: EuiMenuItem[] = [
 *   { label: 'Dashboard', icon: 'home', route: '/dashboard' },
 *   { label: 'Settings', icon: 'settings', route: '/settings' }
 * ];
 * ```
 * ```html
 * <eui-sidebar-menu [items]="menuItems"></eui-sidebar-menu>
 * ```
 *
 * ### Collapsed with icons
 * ```html
 * <eui-sidebar-menu
 *   [items]="menuItems"
 *   [isCollapsed]="true"
 *   [hasIcons]="true"
 *   [hasCollapsedInitials]="true">
 * </eui-sidebar-menu>
 * ```
 *
 * ### With search filter
 * ```html
 * <eui-sidebar-menu
 *   [items]="menuItems"
 *   [hasFilter]="true"
 *   searchFilterLabel="Search menu"
 *   (itemClick)="onMenuItemClick($event)">
 * </eui-sidebar-menu>
 * ```
 *
 * ### Accessibility
 * - Keyboard navigation with arrow keys and Enter
 * - Tooltips provide context in collapsed mode
 * - ARIA labels for screen reader support
 * - Focus management for nested menu items
 *
 * ### Notes
 * - Use `hasTooltipOnExpanded` to show tooltips even when menu is expanded
 * - `expandAllItems` opens all nested menu groups on initial render
 * - `hasBoldRootLevel` emphasizes top-level navigation items
 * - Filter searches through all menu item labels and nested items
 */
class EuiSidebarMenuComponent {
    constructor() {
        /**
         * CSS class binding for the host element
         * @default 'eui-sidebar-menu'
         */
        this.string = 'eui-sidebar-menu';
        /**
         * The menu items to be displayed
         * @default []
         */
        this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
        /**
         * Whether to show initials in collapsed mode
         * @default false
         */
        this.hasCollapsedInitials = input(false, { ...(ngDevMode ? { debugName: "hasCollapsedInitials" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether the sidebar is collapsed
         * @default false
         */
        this.isCollapsed = input(false, { ...(ngDevMode ? { debugName: "isCollapsed" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether to show a filter input for searching menu items
         * @default false
         */
        this.hasFilter = input(false, { ...(ngDevMode ? { debugName: "hasFilter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether to show icons for menu items
         * @default false
         */
        this.hasIcons = input(false, { ...(ngDevMode ? { debugName: "hasIcons" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether to show tooltips for menu items
         * @default true
         */
        this.hasTooltip = input(true, { ...(ngDevMode ? { debugName: "hasTooltip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether to show tooltips even when the menu is expanded
         * @default false
         */
        this.hasTooltipOnExpanded = input(false, { ...(ngDevMode ? { debugName: "hasTooltipOnExpanded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether to show tooltips only from tooltip property instead of label and tabLabel when expanded
         * @default false
         */
        this.hasTooltipOnlyOnExpanded = input(false, { ...(ngDevMode ? { debugName: "hasTooltipOnlyOnExpanded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether to initially expand all menu items
         * @default false
         */
        this.expandAllItems = input(false, { ...(ngDevMode ? { debugName: "expandAllItems" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Whether to make root level menu items bold
         * @default false
         */
        this.hasBoldRootLevel = input(false, { ...(ngDevMode ? { debugName: "hasBoldRootLevel" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
        /**
         * Custom inline styles for the sidebar container
         */
        this.style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : /* istanbul ignore next */ []));
        /**
         * ID of the fragment to navigate to
         */
        this.fragmentId = input(...(ngDevMode ? [undefined, { debugName: "fragmentId" }] : /* istanbul ignore next */ []));
        /**
         * Label for the search filter input
         */
        this.searchFilterLabel = input(...(ngDevMode ? [undefined, { debugName: "searchFilterLabel" }] : /* istanbul ignore next */ []));
        /**
         * Target for external links
         */
        this.externalTarget = input(...(ngDevMode ? [undefined, { debugName: "externalTarget" }] : /* istanbul ignore next */ []));
        /**
         * Initial value for the filter input
         * @default ''
         */
        this.filterValue = input('', ...(ngDevMode ? [{ debugName: "filterValue" }] : /* istanbul ignore next */ []));
        /**
         * Event emitted when the menu itself is clicked
         */
        this.menuClick = output();
        /**
         * Event emitted when a menu item is clicked
         */
        this.itemClick = output();
    }
    /**
     * Handler for menu item click events
     * @param item The menu item that was clicked
     */
    onMenuItemClicked(item) {
        this.itemClick.emit(item);
    }
    /**
     * Handler for menu click events
     * @param event Whether the menu was clicked
     */
    onMenuClicked(event) {
        this.menuClick.emit(event);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: EuiSidebarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.16", type: EuiSidebarMenuComponent, isStandalone: true, selector: "eui-sidebar-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, hasCollapsedInitials: { classPropertyName: "hasCollapsedInitials", publicName: "hasCollapsedInitials", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, hasFilter: { classPropertyName: "hasFilter", publicName: "hasFilter", isSignal: true, isRequired: false, transformFunction: null }, hasIcons: { classPropertyName: "hasIcons", publicName: "hasIcons", isSignal: true, isRequired: false, transformFunction: null }, hasTooltip: { classPropertyName: "hasTooltip", publicName: "hasTooltip", isSignal: true, isRequired: false, transformFunction: null }, hasTooltipOnExpanded: { classPropertyName: "hasTooltipOnExpanded", publicName: "hasTooltipOnExpanded", isSignal: true, isRequired: false, transformFunction: null }, hasTooltipOnlyOnExpanded: { classPropertyName: "hasTooltipOnlyOnExpanded", publicName: "hasTooltipOnlyOnExpanded", isSignal: true, isRequired: false, transformFunction: null }, expandAllItems: { classPropertyName: "expandAllItems", publicName: "expandAllItems", isSignal: true, isRequired: false, transformFunction: null }, hasBoldRootLevel: { classPropertyName: "hasBoldRootLevel", publicName: "hasBoldRootLevel", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, fragmentId: { classPropertyName: "fragmentId", publicName: "fragmentId", isSignal: true, isRequired: false, transformFunction: null }, searchFilterLabel: { classPropertyName: "searchFilterLabel", publicName: "searchFilterLabel", isSignal: true, isRequired: false, transformFunction: null }, externalTarget: { classPropertyName: "externalTarget", publicName: "externalTarget", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuClick: "menuClick", itemClick: "itemClick" }, host: { properties: { "class": "this.string" } }, ngImport: i0, template: "<!--TODO: set the classes into one div container instead of two-->\n<div class=\"eui-sidebar-menu__container\" [class.eui-sidebar-menu__container--collapsed]=\"isCollapsed()\" [style]=\"style()\">\n    <div class=\"eui-sidebar-menu__content\">\n        <eui-menu\n            [items]=\"items()\"\n            [hasFilter]=\"hasFilter()\"\n            [hasIcons]=\"hasIcons()\"\n            [hasTooltip]=\"hasTooltip()\"\n            [hasTooltipOnExpanded]=\"hasTooltipOnExpanded()\"\n            [hasTooltipOnlyOnExpanded]=\"hasTooltipOnlyOnExpanded()\"\n            [isCollapsed]=\"isCollapsed()\"\n            [hasCollapsedInitials]=\"hasCollapsedInitials()\"\n            [expandAllItems]=\"expandAllItems()\"\n            [fragmentId]=\"fragmentId()\"\n            [searchFilterLabel]=\"searchFilterLabel()\"\n            [filterValue]=\"filterValue()\"\n            [hasBoldRootLevel]=\"hasBoldRootLevel()\"\n            (isClick)=\"onMenuClicked($event)\"\n            (itemClick)=\"onMenuItemClicked($event)\">\n        </eui-menu>\n    </div>\n</div>\n", styles: [".eui-21 .eui-sidebar-menu{display:flex;height:100%;width:100%}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container{height:100%;width:100%}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar{display:inherit;height:9px;width:9px;background-color:var(--eui-c-neutral-surface-light)}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar-thumb{background-color:var(--eui-c-neutral-surface);border-radius:5rem;background-clip:padding-box;border:1px solid transparent}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-secondary-surface-dark);border:0;cursor:grab}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus::-webkit-scrollbar-thumb{background-color:var(--eui-c-primary-surface);outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus-visible::-webkit-scrollbar-thumb{background-color:var(--eui-c-primary-surface);outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar-track{background-color:var(--eui-c-neutral-surface-light);border-radius:0}@-moz-document url-prefix(){.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container{scrollbar-color:var(--eui-c-secondary-surface) var(--eui-c-secondary-surface-light);scrollbar-width:auto}}@-moz-document url-prefix(){.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus,.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus-visible{scrollbar-color:var(--eui-c-focus-visible) var(--eui-c-s-secondary-surface-light)}}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container .eui-sidebar-menu__content{display:flex;flex-direction:column;height:100%;position:relative;margin-left:calc(-1 * var(--eui-s-s))}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container .eui-sidebar-menu__content .eui-menu-item__link{padding-left:var(--eui-s-xs);padding-right:var(--eui-s-xs)}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container--collapsed{position:relative;width:var(--eui-app-sidebar-width-close-active)}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container--collapsed .eui-sidebar-menu__content{justify-items:center}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container--collapsed .eui-sidebar-menu__content .eui-menu-item__link{border-top:none;margin-bottom:calc(-1 * var(--eui-s-xs));padding-left:var(--eui-s-xl)}.eui-21 .eui-dropdown-content .eui-sidebar-menu .eui-sidebar-menu__container .eui-sidebar-menu__content{margin-left:0}\n"], dependencies: [{ kind: "component", type: i1.EuiMenuComponent, selector: "eui-menu", inputs: ["items", "searchFilterLabel", "externalLinkLabel", "fragmentId", "filterValue", "isCollapsed", "hasCollapsedInitials", "hasFilter", "hasIcons", "hasIconsLabels", "hasTooltip", "hasTooltipOnExpanded", "hasTooltipOnlyOnExpanded", "expandAllItems", "isFlat", "hasScrollToItem", "hasBoldRootLevel"], outputs: ["isClick", "itemClick", "expandToggle"] }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: EuiSidebarMenuComponent, decorators: [{
            type: Component,
            args: [{ selector: 'eui-sidebar-menu', encapsulation: ViewEncapsulation.None, imports: [
                        ...EUI_MENU,
                    ], template: "<!--TODO: set the classes into one div container instead of two-->\n<div class=\"eui-sidebar-menu__container\" [class.eui-sidebar-menu__container--collapsed]=\"isCollapsed()\" [style]=\"style()\">\n    <div class=\"eui-sidebar-menu__content\">\n        <eui-menu\n            [items]=\"items()\"\n            [hasFilter]=\"hasFilter()\"\n            [hasIcons]=\"hasIcons()\"\n            [hasTooltip]=\"hasTooltip()\"\n            [hasTooltipOnExpanded]=\"hasTooltipOnExpanded()\"\n            [hasTooltipOnlyOnExpanded]=\"hasTooltipOnlyOnExpanded()\"\n            [isCollapsed]=\"isCollapsed()\"\n            [hasCollapsedInitials]=\"hasCollapsedInitials()\"\n            [expandAllItems]=\"expandAllItems()\"\n            [fragmentId]=\"fragmentId()\"\n            [searchFilterLabel]=\"searchFilterLabel()\"\n            [filterValue]=\"filterValue()\"\n            [hasBoldRootLevel]=\"hasBoldRootLevel()\"\n            (isClick)=\"onMenuClicked($event)\"\n            (itemClick)=\"onMenuItemClicked($event)\">\n        </eui-menu>\n    </div>\n</div>\n", styles: [".eui-21 .eui-sidebar-menu{display:flex;height:100%;width:100%}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container{height:100%;width:100%}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar{display:inherit;height:9px;width:9px;background-color:var(--eui-c-neutral-surface-light)}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar-thumb{background-color:var(--eui-c-neutral-surface);border-radius:5rem;background-clip:padding-box;border:1px solid transparent}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-secondary-surface-dark);border:0;cursor:grab}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus::-webkit-scrollbar-thumb{background-color:var(--eui-c-primary-surface);outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus-visible::-webkit-scrollbar-thumb{background-color:var(--eui-c-primary-surface);outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container::-webkit-scrollbar-track{background-color:var(--eui-c-neutral-surface-light);border-radius:0}@-moz-document url-prefix(){.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container{scrollbar-color:var(--eui-c-secondary-surface) var(--eui-c-secondary-surface-light);scrollbar-width:auto}}@-moz-document url-prefix(){.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus,.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container:focus-visible{scrollbar-color:var(--eui-c-focus-visible) var(--eui-c-s-secondary-surface-light)}}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container .eui-sidebar-menu__content{display:flex;flex-direction:column;height:100%;position:relative;margin-left:calc(-1 * var(--eui-s-s))}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container .eui-sidebar-menu__content .eui-menu-item__link{padding-left:var(--eui-s-xs);padding-right:var(--eui-s-xs)}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container--collapsed{position:relative;width:var(--eui-app-sidebar-width-close-active)}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container--collapsed .eui-sidebar-menu__content{justify-items:center}.eui-21 .eui-sidebar-menu .eui-sidebar-menu__container--collapsed .eui-sidebar-menu__content .eui-menu-item__link{border-top:none;margin-bottom:calc(-1 * var(--eui-s-xs));padding-left:var(--eui-s-xl)}.eui-21 .eui-dropdown-content .eui-sidebar-menu .eui-sidebar-menu__container .eui-sidebar-menu__content{margin-left:0}\n"] }]
        }], propDecorators: { string: [{
                type: HostBinding,
                args: ['class']
            }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], hasCollapsedInitials: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasCollapsedInitials", required: false }] }], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }], hasFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasFilter", required: false }] }], hasIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasIcons", required: false }] }], hasTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTooltip", required: false }] }], hasTooltipOnExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTooltipOnExpanded", required: false }] }], hasTooltipOnlyOnExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTooltipOnlyOnExpanded", required: false }] }], expandAllItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandAllItems", required: false }] }], hasBoldRootLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBoldRootLevel", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], fragmentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "fragmentId", required: false }] }], searchFilterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchFilterLabel", required: false }] }], externalTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalTarget", required: false }] }], filterValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterValue", required: false }] }], menuClick: [{ type: i0.Output, args: ["menuClick"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });

const EUI_SIDEBAR_MENU = [
    EuiSidebarMenuComponent,
];
// export { EuiSidebarMenuComponent as EuiSidebarMenu } from './eui-sidebar-menu.component';

/**
 * Generated bundle index. Do not edit.
 */

export { EUI_SIDEBAR_MENU, EuiSidebarMenuComponent };
//# sourceMappingURL=eui-components-eui-sidebar-menu.mjs.map
