import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core'; import { NgControl } from '@angular/forms'; import { TranslocoScope } from '@jsverse/transloco'; import { OptionBase } from '@sebgroup/green-angular/src/v-angular/core'; import { NggvInputComponent } from '@sebgroup/green-angular/src/v-angular/input'; import { NggvDropdownComponent } from '../../dropdown.component'; import * as i0 from "@angular/core"; export declare class NggvTypeaheadInputComponent extends NggvInputComponent implements OnInit, OnDestroy { element: ElementRef; private renderer2; ngControl: NgControl; protected translocoScope: TranslocoScope; protected cdr: ChangeDetectorRef; /** Reference to the host dropdown */ hostComponent: NggvDropdownComponent; /** Formats each item that is displayed as an option. Only applies format if the option if it implement Option interface. */ resultFormatter?: (option: OptionBase) => string; /** Formats the selected item in the input when dropdown is opened. If no function is provided, it will display the value of the selected objects label property */ selectedFormatter?: (selected: OptionBase) => string; get dropdownButton(): HTMLElement; /** Boolean to indicate wether the dropdown is expanded or not, to apply appropriate styling */ expanded: boolean; /** Used to determine the height of the inputin html */ buttonHeight?: number; /** @internal Used to determine wether the input has been moved or not */ inputMoved: boolean; constructor(element: ElementRef, renderer2: Renderer2, ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef); ngOnInit(): void; /** * @internal * Allow space to be inputted as text * @param event fired containing which key was released. */ onKeyUp(event: KeyboardEvent): void; /** * @internal * First time the dropdown is expanded, move the input sp it becomes a child of the dropdown button * to better reflect semantics and styling. */ private moveInput; /** * @internal * When dropdown is expanded, focus on the input. If a value is selected, set it in the input. * When the dropdown is collapsed, empty the input from text. */ private handleExpandedChange; /** * @internal Formats the selected option to display in the input. Interpolate the returned value * since we don't know the return type or label type. * @param value The selected value * @returns The formatted value */ private formatSelected; /** * Sets the input programmatically instead of native HTML input event. * @param input */ private setInput; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }