import { OnInit } from '@angular/core'; import { TerraPlacementEnum } from '../../../../../helpers'; import { TerraSuggestionBoxValueInterface } from '../../../suggestion-box/data/terra-suggestion-box.interface'; import { Observable, Subject } from 'rxjs'; import { ControlValueAccessor, FormControl } from '@angular/forms'; import { SuggestionInterface } from './suggestion.interface'; import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; import { L10nLocale } from 'angular-l10n'; import * as i0 from "@angular/core"; /** A type guard to check whether the given value is of the type {@link TerraSuggestionBoxValueInterface}. */ export declare function isSuggestionValue(value: unknown): value is TerraSuggestionBoxValueInterface; export declare class SuggestionComponent implements ControlValueAccessor, SuggestionInterface, OnInit { _locale: L10nLocale; /** Set the label. */ name: string; /** If true, a * indicates that the value is required. Default false. */ isRequired: boolean; /** If true, the autocomplete-input will be disabled. Default false. */ set isDisabled(disabled: boolean); /** Set the tooltip. */ tooltipText: string; /** Set the tooltip placement (bottom, top, left, right). Default top. */ tooltipPlacement: TerraPlacementEnum; /** A list of options that the user can select from the suggestion box. */ listBoxValues: Array; /** A formControl for the handling of the value. */ _control: FormControl; /** An observable list of suggestions. The list will be updated whenever the user types in the input. */ _filteredOptions: Observable>; /** A subject which emits whenever the panel is opened. */ _autoCompleteOpened: Subject; /** Stores the callback function that will be called on blur. */ _onTouchedCallback: () => void; /** Stores the callback function that will be called when the control's value changes in the UI. */ _onChangeCallback: (_: any) => void; constructor(_locale: L10nLocale); /** Formats the value to be displayed. */ _displayFn: (value: TerraSuggestionBoxValueInterface) => string; ngOnInit(): void; /** Registers a callback function that is called when the control's value changes in the UI. */ registerOnChange(fn: (_: any) => void): void; /** Registers a callback function that is called by the forms API on initialization to update the form model on blur. */ registerOnTouched(fn: () => void): void; /** Writes a new value to the input element. */ writeValue(value: any): void; /** Calls the onChangeCallback whenever the user selects a new option. */ _optionSelected(event: MatAutocompleteSelectedEvent): void; /** A function to filter the listBoxValues depending on the value in the autocomplete-input. */ private _filter; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }