import Provider from './Provider'; import { TooltipManager } from './TooltipManager'; type OnChangeCallback = (value: string, name: string, typeAhead: HTMLElement) => void; export default class TypeaheadManager { private readonly element; private readonly provider; private readonly template; private readonly tooltipManager; /** * Initializes a new type-ahead manager for the given area. * * @param element the area to check for type-ahead */ constructor(element: HTMLElement, provider: Provider, template: (options: { value: string; label: string; }[], value: string, suggestedValue: string, search: string) => string, tooltipManager: TooltipManager); /** * Sets the callback to call when the value changes. * * @param callback the callback to call */ onChange(callback: OnChangeCallback): void; /** * Closes all open typeahead dropdowns. */ closeAll(): void; private setupEventListeners; /** * It displays the dropdown for the given input. * * @param target The input field to display the dropdown for. * @param refresh If the dropdown should be refreshed. * @returns */ private displayDropdown; } export {};