import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
import { MenuMode } from '../../../../types/src/menu';
import { CSSResultGroup } from 'lit';
import { default as CxMenuItem } from '../menu-item/menu-item';

export interface MenuSelectEventDetail {
    item: CxMenuItem;
}
/**
 * @summary Menus provide a list of options for the user to choose from.
 *
 * @description You can use [menu items](?s=atoms&id=/menu-item), [menu labels](?s=atoms&id=/menu-label),
 * and [dividers](?s=atoms&id=/divider) to compose a menu.
 * Menus support keyboard interactions, including type-to-select an option.
 *
 * @slot (default) - The menu's content, including menu items, menu labels, and dividers.
 * @slot back-button - A slot for a custom back button, used in 'multiple' variant menus.
 *
 * @attr {boolean} no-uncheck - When true, checkbox items do not toggle off when activated while already checked; applies to all checkbox items in this menu and combines with each item's own `no-uncheck`.
 *
 * @event {{ item: CxMenuItem }} cx-select - Emitted when a menu item is selected.
 */
export default class CxMenu extends CortexElement {
    static styles: CSSResultGroup;
    private readonly localize;
    defaultSlot: HTMLSlotElement;
    horizontal: boolean;
    /** The menu's variant */
    variant: MenuMode.Default | MenuMode.Multiple;
    /** Whether the menu is currently active, used for 'multiple' variant */
    active: boolean;
    /** The name of the menu, used for 'multiple' variant */
    name: string;
    /** The name of the menu to go back to, used for 'multiple' variant */
    back: string;
    /** Whether the menu is the default menu, used for 'multiple' variant */
    default: boolean;
    /** Can menu bubble keydown events */
    bubbleKeyDown: boolean;
    /**
     * Override the default keydown navigation behavior of the dropdown menu.
     */
    ignoredKeys: string[];
    disabledTabLoop: boolean;
    /**
     * When true, checkbox items in this menu do not toggle off when already activated while checked—the same behavior as setting `no-uncheck` on each checkbox item.
     */
    noUncheck: boolean;
    resizeObserver: ResizeObserver | null;
    private slotMutationObserver;
    connectedCallback(): void;
    disconnectedCallback(): void;
    runFirstUpdated(): void;
    private handleClick;
    private handleKeyDown;
    private handleMouseDown;
    private handleSlotChange;
    private isMenuSection;
    private isMenuItem;
    /** @internal Gets all slotted menu items, ignoring dividers, headers, and other elements. */
    getAllItems(): CxMenuItem[];
    /** @internal Gets all slotted submenus, used for 'multiple' variant */
    getAllSubMenus(): CxMenu[];
    setActiveMenu(menuName: string): void;
    adjustMenuSize(duration?: number): Promise<void>;
    resetActiveMenu(): void;
    getActiveMenu(): CxMenu | undefined;
    /**
     * @internal Gets the current menu item, which is the menu item that has `tabindex="0"` within the roving tab index.
     * The menu item may or may not have focus, but for keyboard interaction purposes it's considered the "active" item.
     */
    getCurrentItem(): CxMenuItem | undefined;
    /**
     * @internal Sets the current menu item to the specified element. This sets `tabindex="0"` on the target element and
     * `tabindex="-1"` to all other items. This method must be called prior to setting focus on a menu item.
     */
    setCurrentItem(item: CxMenuItem): void;
    render(): import('lit').TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-menu': CxMenu;
    }
}
