export type HrType = { type: 'hr'; }; export type LiType = { type: 'li'; text: string; disabled?: boolean; callback: EventListener; close?: boolean; uniqueActive?: boolean; arrow?: boolean; }; export interface AttrsType { class?: string; style?: string | { [key: string]: string; }; } export type ItemType = AttrsType & ElementType; export type UlType = { type: 'ul'; text: string; disabled?: boolean; children: ItemType[]; }; export type ElementType = HrType | LiType | UlType; type GetKeysType = T extends ElementType ? keyof T : never; type ElementKeysType = GetKeysType; export type ConfigType = { el: string | HTMLElement; mode?: 'context-menu' | 'nav-menu' | 'click'; theme?: string; minWidth?: string | number; maxWidth?: string | number; include?: string[] | RegExp; exclude?: string[] | RegExp; defaultProps?: { [key in ElementKeysType]?: string; }; beforeInit?: Function; afterInit?: Function; beforeShow?: Function; afterShow?: Function; beforeHide?: Function; afterHide?: Function; color?: 'dark' | 'light'; }; export type OptionsType = ItemType[] | ((e: Event, config: ConfigType) => ItemType[] | Promise); export interface MenuElement extends HTMLElement { direction?: LayoutMenuDirection; } export declare const ConnectOffset = 5; export declare const ATTR_LIST: string[]; export declare const SPLIT_SYMBOL: { class: string; style: string; }; export declare const enum LayoutMenuDirection { Left = -1, Right = 1 } export {};