/**
 * Copyright Aquera Inc 2026
 *
 * This source code is licensed under the BSD-3-Clause license found in the
 * LICENSE file in the root directory of this source tree.
 */
import { CSSResultArray, TemplateResult } from 'lit';
import type { PropertyValues } from 'lit';
import NileElement from '../internal/nile-element';
import type { NileContextMenuItem } from '../nile-context-menu-item';
import '../nile-floating-panel';
import '../nile-context-menu-group';
import '../nile-context-menu-item';
import '../nile-context-submenu';
export interface NileContextMenuItemData {
    type: 'item';
    id: string;
    label: string;
    value?: string;
    disabled?: boolean;
    icon?: string;
    iconSet?: string;
    iconSize?: string;
    iconMethod?: 'fill' | 'stroke' | string;
    iconColor?: string;
    submenu?: NileContextMenuData[];
}
export interface NileContextMenuGroupData {
    type: 'group';
    name?: string;
    data: NileContextMenuItemData[];
}
export type NileContextMenuData = NileContextMenuGroupData;
export type NileContextMenuTrigger = 'right' | 'left' | 'both' | 'manual' | 'global';
export interface NileContextMenuOpenOptions {
    x: number;
    y: number;
    target?: Element;
    originalEvent?: Event;
}
export type NileContextMenuCloseReason = 'select' | 'outside-click' | 'escape' | 'programmatic';
interface NileContextMenuOpenContext {
    x: number;
    y: number;
    target: Element | null;
    originalEvent: Event | null;
}
/**
 * Nile context-menu component.
 *
 * @tag nile-context-menu
 *
 * @slot Default menu content.
 *
 * @event nile-change Fired on menu lifecycle and selection. `detail.type` is one of
 *   `'open'`, `'click'`, or `'close'`; remaining fields depend on the type.
 */
export declare class NileContextMenu extends NileElement {
    static get styles(): CSSResultArray;
    for: string;
    trigger: NileContextMenuTrigger;
    skipOn: string;
    zIndex: number;
    items: NileContextMenuData[];
    private get _isDataMode();
    private _floatingPanel?;
    private _items;
    private _open;
    protected _openContext: NileContextMenuOpenContext | null;
    protected _targetEl: Element | null;
    private _previouslyFocused;
    private static _openInstances;
    private _detachTriggers?;
    private _lightObserver?;
    private _menuObserver?;
    private _proxyEl?;
    private readonly _proxyId;
    private _wasDataMode;
    connectedCallback(): void;
    protected updated(changed: PropertyValues): void;
    private _resolveTarget;
    get targetElement(): Element | null;
    private _attachTriggers;
    disconnectedCallback(): void;
    private _menuContainerRef;
    protected firstUpdated(): void;
    private _ensureProxy;
    private _positionProxyAt;
    private _relocateLightChildren;
    private _renderDataItems;
    private _createDataNode;
    private _createItemNode;
    private _parseChildren;
    private _isInsideDescendantSubmenu;
    get menuItems(): readonly NileContextMenuItem[];
    getItemByValue(value: string): NileContextMenuItem | undefined;
    get isOpen(): boolean;
    open(options: NileContextMenuOpenOptions): void;
    close(reason?: NileContextMenuCloseReason): void;
    private _enabledItems;
    private _getFocusedItem;
    private _getFocusedItemAnyLevel;
    private _enabledItemsIn;
    private _focusFirstEnabled;
    private _moveFocus;
    private _onKeydown;
    private _findSubmenuOwning;
    private _onScroll;
    private _onOutsidePointer;
    private _onDescendantSelect;
    private _stop;
    private _onPanelShown;
    private _onMenuMouseOver;
    private _onMenuClick;
    private _selectItem;
    render(): TemplateResult;
}
export default NileContextMenu;
declare global {
    interface HTMLElementTagNameMap {
        'nile-context-menu': NileContextMenu;
    }
}
