import { FormGroupHelper } from '../../shared/form-group.helper';
import { ElementRef, AfterViewInit, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { TranslateService } from "@ngx-translate/core";
import { FormControlBase } from "../form-control-base";
import { ValidationMessageService } from "../../core/validation-message.service";
import { ValidatorFn } from '@angular/forms';
/**
 * The type of textbox where text is input[type="text"], multi_line is a
 * textarea, email is input[type="email"], url is input[type="url"], and password
 * is an input[type="password"]
 *
 * If the type is url a regex pattern is automatically added to the form validators.  No other pattern validators
 * may be used for this input, having more than one will cause issues.
 *
 * If the type is email an email validator is automatically added to the form validators.
 * */
export declare type TextboxType = "text" | "multi_line" | "email" | "url" | "password";
/** Type for advanced validation of textbox form controls, if in the future
 *  we want more handling we will need to update this type.
 */
export declare type TextboxValidatorParameters = {
    required?: boolean;
    minLength?: number;
    maxLength?: number;
    unique?: boolean;
    valid?: boolean;
    pattern?: RegExp;
};
/** Advanced validation for textbox form controls */
export declare const textboxValidation: (validatorParams: TextboxValidatorParameters) => ValidatorFn;
export declare class TextboxComponent extends FormControlBase implements OnInit, AfterViewInit, OnChanges {
    protected validationMessageService: ValidationMessageService;
    protected formGroupHelper: FormGroupHelper;
    protected translate: TranslateService;
    /**
     * Set the value of the input's autocomplete attribute
     */
    autocomplete?: string;
    /**
     * The textbox type
     */
    type?: TextboxType;
    /**
     * The value of the textbox input's placeholder
     */
    placeholder?: string;
    /**
     * The maximum number of characters allowed in the input
     *
     * This is for adding the attribute on the element to get the browser functionality
     * from the input.  If you need the form to be validated before submission, apply the
     * maxLength validator to the form conrol.
     */
    maxlength?: number;
    /**
     * The minimum number of characters allowed in the input
     *
     * This is for adding the attribute on the element to get the browser functionality
     * from the input.  If you need the form to be validated before submission, apply the
     * minLength validator to the form conrol.
     */
    minlength?: number;
    /**
     * The value of the rows attiribute for a textarea. Only applies to multi-line type
     */
    rows?: number;
    /**
     * If set to true, we will select all text within the input if
     * autofocus is also set to true
     */
    selectOnAutofocus?: boolean;
    /**
     * If set to true, we will upper case on focus out
     */
    upperCase: boolean;
    protected inputElement: ElementRef;
    constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, translate: TranslateService);
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * The angular onInit lifecycle hook
     */
    ngOnInit(): void;
    /**
     * The angular afterViewInit lifecycle hook
     */
    ngAfterViewInit(): void;
    /**
     * Function to set focus on an input programatically after the page
     * had been rendered.  The highlight text flag will select the text
     * within the input if passed in and true
     */
    setFocus(highlightText?: boolean): void;
    /**
  * Focus out event handler
  * will upper case and trim value if upperCase is true (this is what we do on the apis)
  */
    focusOutEvent(): void;
}
