import { createLinear } from "makeup-roving-tabindex"; import typeahead from "makeup-typeahead"; import type { Input as EbayButtonInput, ButtonEvent } from "../ebay-button/index.marko"; import { type MenuItem, type BaseMenuInput, type MenuState, MenuUtils } from "../../common/menu-utils"; import type { WithNormalizedProps } from "../../global"; export interface MenuEvent { el?: HTMLElement; checked?: string[]; checkedIndex?: number[]; originalEvent?: T; index?: number; currentChecked?: boolean; } export interface Item extends MenuItem { badgeNumber?: number; } interface MenuInput extends BaseMenuInput, Omit { item?: Marko.AttrTag; variant?: "filter" | "none"; "class-prefix"?: string; "typeahead-timeout-length"?: number; reverse?: boolean; fixed?: boolean; "fix-width"?: boolean; renderBody?: Marko.Body; "footer-button"?: Marko.AttrTag; "on-keydown"?: (event: MenuEvent) => void; "on-footer-button-click"?: (event: ButtonEvent) => void; "on-change"?: (event: MenuEvent) => void; "on-select"?: (event: MenuEvent) => void; } export interface Input extends WithNormalizedProps { } export default class extends MenuUtils { rovingTabindex: ReturnType; tabindexPosition: number; contentEl: HTMLElement; getTypeaheadIndex: ReturnType["getIndex"]; destroyTypeahead: ReturnType["destroy"]; items: Item[]; onCreate(): void; toggleItemChecked(index: number, originalEvent: Event, itemEl: HTMLElement): void; handleItemClick(index: number, originalEvent: MouseEvent, itemEl: HTMLElement): void; handleItemKeydown(index: number, originalEvent: KeyboardEvent, itemEl: HTMLElement): void; handleItemKeypress({ key }: KeyboardEvent): void; emitComponentEvent({ eventType, el, originalEvent, index, }: { eventType: string; el?: HTMLElement; originalEvent: Event; index?: number; }): void; onInput(input: Input): void; onRender(): void; onMount(): void; onUpdate(): void; onDestroy(): void; _setupMakeup(): void; _cleanupMakeup(): void; } export {};