/** * Copyright (c) IBM, Corp. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /// import { LitElement } from 'lit'; import type { TemplateResult } from 'lit'; import '../column-list/index.js'; interface HighlightTextState { text: string; isHighlighted: boolean; } interface NavLink { label: string; url: string; } interface QiskitMegaMenuDropdownGroup { title: NavLink; content: NavLink[]; } interface QiskitMegaMenuDropdownBlock { title: string; content: QiskitMegaMenuDropdownGroup[]; } export type QiskitMegaMenuDropdownContent = QiskitMegaMenuDropdownBlock[]; export declare class QiskitMegaMenuDropdown extends LitElement { static styles: import("lit").CSSResultGroup[]; protected _filterInput: HTMLInputElement; protected _mainElement: HTMLElement; placeholder: string; content: QiskitMegaMenuDropdownContent; protected _performedSearchEventTimeout: NodeJS.Timeout | null; protected _showContent: boolean; protected _filteredContent: QiskitMegaMenuDropdownContent; private highlightedText; private emptyContentView; render(): TemplateResult<1>; connectedCallback(): void; disconnectedCallback(): void; _handleClick: (e: MouseEvent) => void; get _textOnTheFilter(): string; set _textOnTheFilter(val: string); get _isFilteredContentEmpty(): boolean; get _isFilterTextEmpty(): boolean; _wordsOnTheFilter(): string[]; _onShowContent(): void; _onSwitchShowContent(): void; _onTextOnTheFilterChanged(): void; _filterContent(): QiskitMegaMenuDropdownContent; _filterMegaDropdownBlock(block: QiskitMegaMenuDropdownBlock, wordsOnTheFilter: string[]): QiskitMegaMenuDropdownBlock; _filterMegaDropdownGroup(group: QiskitMegaMenuDropdownGroup, wordsOnTheFilter: string[]): QiskitMegaMenuDropdownGroup; _containsWordsOnTheFilter(label: string, wordsOnTheFilter: string[]): boolean; _splitTextInHighlightParts(menuLabel: string): HighlightTextState[]; _splitTextInHighlightedChars(menuLabel: string, wordsOnTheFilter: string[]): HighlightTextState[]; _joinCharsByHighlightedState(highlightStateByChar: HighlightTextState[]): HighlightTextState[]; _performedSearch(): void; _removePerformedSearchEventTimeout(): void; _dispatchPerformedSearchEvent(text: string): void; } declare global { interface HTMLElementTagNameMap { 'qiskit-mega-menu-dropdown': QiskitMegaMenuDropdown; } } export {};