import { LitElement, PropertyValues, TemplateResult } from 'lit';
import { StyleInfo } from 'lit/directives/style-map.js';
import { type HorizontalAlignment, type VerticalAlignment } from '../../../lib/ElementPositioning.js';
export interface UiDropdownListSelection {
    item: HTMLElement;
}
/**
 * An overlay list rendered over a button.
 *
 * Examples:
 *
 * <ui-dropdown-list>
 *  <ui-button color="filled">Click me</ui-button>
 *  <ui-list slot="dropdown" role="menu">
 *    <ui-list-item role="menuitem">Item 1</ui-list-item>
 *    <ui-list-item role="menuitem">Item 2</ui-list-item>
 *  </ui-list>
 * </ui-dropdown-list>
 *
 * @slot - The default slot for the dropdown trigger (button)
 * @slot dropdown - The slot for the list.
 * @fires select - Custom event with the selected item on the `detail.item` when the user selected an item.
 *                 When the event is cancelled then there's no side effects (closing the dropdown)
 * @fires dropdownopen - An event informing other dropdowns that this one was opened and other should close.
 * @fires open - An event dispatched when the open state change through a user interaction
 */
export default class UiDropdownList extends LitElement {
    protected accessor triggers: HTMLElement[];
    protected accessor dropdowns: HTMLElement[];
    protected accessor triggerId: string;
    protected accessor menuId: string;
    /**
     * Whether the menu is opened.
     * @attribute
     */
    accessor open: boolean;
    /**
     * The vertical (y-axis) alignment of the dropdown content.
     * - top
     * - bottom
     * - middle
     *
     * No value means the natural position according to the box model.
     * @attribute
     */
    accessor verticalAlign: VerticalAlignment | undefined;
    /**
     * The horizontal (x-axis) alignment of the dropdown content.
     * - top
     * - bottom
     * - middle
     *
     * No value means the natural position according to the box model.
     * @attribute
     */
    accessor horizontalAlign: HorizontalAlignment | undefined;
    /**
     * Affects the `horizontal` and `vertical` positioning so that the target element does not overlap with the anchor.
     * For example, when the `vertical` align is `top`, the top edge of the target will be rendered at the bottom
     * of the anchor down to the edge of the viewport.
     * @attribute
     */
    accessor noOverlap: boolean | undefined;
    /**
     * When set it closes the opened list when registering a click outside the list.
     * @attribute
     */
    accessor closeOnOutsideClick: boolean | undefined;
    /**
     * When set it makes the drop-down to match the width of the trigger.
     * Be careful as this may crop the content when the trigger is not wide enough.
     * @attribute
     */
    accessor matchTriggerWidth: boolean | undefined;
    /**
     * When set it closes the drop-down when `tab` button is pressed.
     * This is not a default behavior since the drop-down content can have its own logic
     * related to tab index.
     */
    accessor closeOnTab: boolean | undefined;
    /**
     * The first element located in the default slot.
     */
    protected get trigger(): HTMLElement | null;
    /**
     * The first element located in the "dropdown" slot.
     */
    protected get dropdown(): HTMLElement | null;
    protected accessor overlayPositioning: StyleInfo | undefined;
    constructor();
    connectedCallback(): void;
    disconnectedCallback(): void;
    protected dropdownOpenHandler(e: Event): void;
    protected willUpdate(cp: PropertyValues<this>): void;
    protected updated(cp: PropertyValues<this>): void;
    protected updateExpanded(): void;
    protected triggerChanged(): void;
    protected dropdownChanged(): void;
    /**
     * Decorates the trigger with aria attributes.
     */
    protected decorateTrigger(button: HTMLElement): void;
    protected decorateDropdown(list: HTMLElement): void;
    protected triggerClickHandler(): void;
    protected triggerKeyDownHandler(e: KeyboardEvent): void;
    protected contentKeyDownHandler(e: KeyboardEvent): void;
    protected contentClickHandler(e: PointerEvent): void;
    close(): void;
    protected contentCloseHandler(e: Event): void;
    /**
     * Since the container for the dropdown content is positioned as fixed
     * we need to position the dropdown according to the configured rules.
     */
    protected computePositioning(): void;
    protected scrollHandler(): void;
    protected clickHandler(e: Event): void;
    protected toggleOpened(): void;
    /**
     * When set, it is the last active child of the dropdown
     * before the tabindex was removed from it. It is used to restore focus
     * when the dropdown is re-opened.
     */
    lastActiveChild?: HTMLElement;
    /**
     * When the list is closed, the tabindex of the dropdown is removed to prevent
     * it from being focused while invisible.
     */
    protected manageTabindex(): void;
    protected handleOpened(): void;
    protected handleClosed(): void;
    protected activate(e: Event): void;
    protected notifyOpen(): void;
    protected render(): TemplateResult;
    protected renderTrigger(): TemplateResult;
    protected renderContent(): TemplateResult;
}
//# sourceMappingURL=UiDropdownList.d.ts.map