import * as i0 from '@angular/core'; import { OnInit, OnChanges, EventEmitter, TemplateRef, ElementRef, SimpleChanges } from '@angular/core'; import { Query, ResultItem } from '@spinque/query-api'; import { Observable } from 'rxjs'; import { SpinqueApiService } from '@spinque/angular-ui'; import { MatAutocompleteTrigger } from '@angular/material/autocomplete'; import { FormControl } from '@angular/forms'; /** * A search bar with support for autosuggest, working with SpinqueQuery stacks. */ declare class SpinqueSearchField implements OnInit, OnChanges { private api; /** * Set the value of the input field */ value?: string; /** * Assumes that the top endpoint in the query is the endpoint to use for suggest */ query?: Query; /** * Name of the parameter in the suggest endpoint to fill with the query when suggesting */ parameterName?: string; /** * Placeholder value for the search input */ placeholder: string; showSearchButton: boolean; icon?: string; ariaLabelClearButton?: string; ariaLabelSearchButton?: string; ariaLabelSearchFieldInput?: string; /** * Delay between keystrokes for submitting the next queryChange */ debounceTime: number; /** * Outputs the query whenever it changes */ queryChange: EventEmitter; /** * Outputs the query when the uses presses 'enter', the search button or a suggestion */ search: EventEmitter; template: TemplateRef | null; autocomplete?: MatAutocompleteTrigger; autocompleteControl?: FormControl; autocomplete$?: Observable; hasAutocompleteResults: boolean; /** * Mapping from SpinqueResultItem to string */ itemToText: (item: ResultItem) => string; input: ElementRef; constructor(api: SpinqueApiService); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; submit(): void; clear(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export { SpinqueSearchField };