import { CSSResultGroup, LitElement, PropertyValues } from "lit";
import { MenuPositionX, MenuPositionY } from "./MenuPosition";
import { MenuItemElementBase } from "./MenuItemElementBase";
import { MenuVariant } from "./MenuVariant";
declare const M3eMenuElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor & typeof LitElement;
/**
* Presents a list of choices on a temporary surface.
*
* @description
* The `m3e-menu` component presents a list of choices on a temporary surface, typically anchored to a trigger element.
* It supports dynamic positioning via `position-x` and `position-y` attributes, and renders its contents through the default slot.
*
* @example
* The following example illustrates a basic menu. The `m3e-menu-trigger` is used to trigger a `m3e-menu` specified
* by the `for` attribute when its parenting element is activated.
* ```html
*
* Basic menu
*
*
* ```
*
* @example
* The next example illustrates nested menus. Submenus are triggered by placing a `m3e-menu-trigger` inside a `m3e-menu-item`.
* ```html
*
* Nested menus
*
*
*
*
* ```
*
* @tag m3e-menu
*
* @slot - Renders the contents of the menu.
*
* @attr position-x - The position of the menu, on the x-axis.
* @attr position-y - The position of the menu, on the y-axis.
* @attr variant - The appearance variant of the menu.
*
* @fires beforetoggle - Dispatched before the toggle state changes.
* @fires toggle - Dispatched after the toggle state has changed.
*
* @cssprop --m3e-menu-container-shape - Controls the corner radius of the menu container.
* @cssprop --m3e-menu-active-container-shape - Controls the corner radius of the menu container when active.
* @cssprop --m3e-menu-container-min-width - Minimum width of the menu container.
* @cssprop --m3e-menu-container-max-width - Maximum width of the menu container.
* @cssprop --m3e-menu-container-max-height - Maximum height of the menu container.
* @cssprop --m3e-menu-container-padding-block - Vertical padding inside the menu container.
* @cssprop --m3e-menu-container-padding-inline - Horizontal padding inside the menu container.
* @cssprop --m3e-menu-container-color - Background color of the menu container.
* @cssprop --m3e-menu-container-elevation - Box shadow elevation of the menu container.
* @cssprop --m3e-vibrant-menu-container-color - Background color of the menu container for vibrant variant.
* @cssprop --m3e-menu-divider-spacing - Vertical spacing around slotted `m3e-divider` elements.
* @cssprop --m3e-menu-gap - Gap between content in the menu.
*/
export declare class M3eMenuElement extends M3eMenuElement_base {
#private;
/** The styles of the element. */
static styles: CSSResultGroup;
/** @private */ static __activeMenu?: M3eMenuElement;
/**
* The position of the menu, on the x-axis.
* @default "after"
*/
positionX: MenuPositionX;
/**
* The position of the menu, on the y-axis.
* @default "below"
*/
positionY: MenuPositionY;
/**
* The appearance variant of the menu.
* @default "standard"
*/
variant: MenuVariant;
/** The items of the menu. */
get items(): ReadonlyArray;
/** A value indicating whether the menu is open. */
get isOpen(): boolean;
/** A value indicating whether the menu is a submenu. */
submenu: boolean;
/** @inheritdoc */
connectedCallback(): void;
/** @inheritdoc */
disconnectedCallback(): void;
/**
* Opens the menu.
* @param {HTMLElement} trigger The element that triggered the menu.
* @returns {Promise} A `Promise` that resolves when the menu is opened.
*/
show(trigger: HTMLElement): Promise;
/**
* Hides the menu.
* @param {boolean} [restoreFocus=false] A value indicating whether to restore focus to the menu's trigger.
*/
hide(restoreFocus?: boolean): void;
/**
* Closes this menu and any parenting menus.
* @param {boolean} [restoreFocus=false] A value indicating whether to restore focus to the menu's trigger.
*/
hideAll(restoreFocus?: boolean): void;
/**
* Toggles the menu.
* @param {HTMLElement} trigger The element that triggered the menu.
* @returns {Promise} A `Promise` that resolves when the menu is opened or closed.
*/
toggle(trigger: HTMLElement): Promise;
/** @inheritdoc */
protected render(): unknown;
/** @inheritdoc */
protected firstUpdated(_changedProperties: PropertyValues): void;
}
interface M3eMenuElementEventMap extends HTMLElementEventMap {
beforetoggle: ToggleEvent;
toggle: ToggleEvent;
}
export interface M3eMenuElement {
addEventListener(type: K, listener: (this: M3eMenuElement, ev: M3eMenuElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener(type: K, listener: (this: M3eMenuElement, ev: M3eMenuElementEventMap[K]) => void, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
declare global {
interface HTMLElementTagNameMap {
"m3e-menu": M3eMenuElement;
}
}
export {};
//# sourceMappingURL=MenuElement.d.ts.map