import { EventEmitter, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
import { TsButtonActionTypes, TsButtonFunctionTypes } from '@terminus/ui/button';
import { TsStyleThemeTypes } from '@terminus/ui/utilities';
/**
* Define the user object interface
*/
export interface TsSearchResponse {
/**
* The search query
*/
query: string;
}
/**
* A presentational component to render a search form
*
* @example
*
*
* https://getterminus.github.io/ui-demos-release/components/search
*/
export declare class TsSearchComponent implements OnInit {
private formBuilder;
/**
* Define the button action label
*/
buttonAction: TsButtonActionTypes;
/**
* Define the button type
*/
buttonType: TsButtonFunctionTypes;
/**
* Get a reference to the search form control
*/
get searchFormControl(): AbstractControl | null;
/**
* Define a helper to return the current query string. If current form value length below minimum length, set the query to empty string
*/
get currentQuery(): string;
/**
* Define a debounced method to emit the submission event
*/
debouncedEmit: Function;
/**
* Define the icon name
*/
icon: string;
/**
* Define the regular expression to validate the query
*/
inputPatternRegex: string;
/**
* Define the minimum length of a valid query
*/
queryMinLength: number;
/**
* Initialize the form
*/
searchForm: FormGroup;
/**
* Store the search query
*/
query: string;
/**
* Define if the input should automatically submit values as typed
*/
autoSubmit: boolean;
/**
* Define an initial value for the search input
*/
initialValue: string | undefined;
/**
* Define the hint text below the input
*/
inputHint: string;
/**
* Define the primary label for the input
*/
inputLabel: string;
/**
* Define if the search should be disabled
*/
isDisabled: boolean;
/**
* Define if the search input should be focused initially
*/
isFocused: boolean;
/**
* Define if the search is currently submitting a query
*/
isSubmitting: boolean;
/**
* Define whether formControl needs a validation or a hint
*/
noValidationOrHint: boolean;
/**
* Define the theme
*/
theme: TsStyleThemeTypes;
/**
* Define if the user can clear the search input
*/
userCanClear: boolean;
/**
* The event to emit when the internal input value is changed
*/
readonly changed: EventEmitter;
/**
* The event to emit when the internal input value is cleared
*/
readonly cleared: EventEmitter;
/**
* The event to emit when the form is submitted
*/
readonly submitted: EventEmitter;
constructor(formBuilder: FormBuilder);
/**
* Seed the value if needed on initialization
*/
ngOnInit(): void;
/**
* Fire events as needed after keyup events
*/
keyup(): void;
/**
* Emit the submitted event
*
* NOTE: This wrapper is needed so that we can pass the query value to the emitter
*/
private emitSubmit;
}