import { AfterViewChecked, AfterViewInit, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
import { FormControl, ValidatorFn } from "@angular/forms";
import { ValidationMessageService } from '../../core/validation-message.service';
import { FormGroupHelper } from '../../shared/form-group.helper';
import { FormControlBase } from "../form-control-base";
/**
 * Custom validator to check that min/max and pattern validation is met on the numericbox
 * component
 */
export declare const numericboxValidation: (min: number | undefined, max: number | undefined, decimals: number | undefined) => ValidatorFn;
export declare class NumericboxComponent extends FormControlBase implements OnInit, OnDestroy, OnChanges, AfterViewChecked, AfterViewInit {
    protected validationMessageService: ValidationMessageService;
    protected formGroupHelper: FormGroupHelper;
    protected renderer: Renderer2;
    /**
     * The value of the textbox input's placeholder
     */
    placeholder?: string;
    /**
     * The number of decimals allowed.  If not supplied the input value will be validated as a
     * whole number
     */
    decimals?: number;
    /**
     * Show trailing zeros after the decimal point
     */
    showPrecision?: boolean;
    /**
     * The maximum value 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
     * max validator to the form conrol.
     */
    max?: number;
    /**
     * The minimum value 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
     * min validator to the form conrol.
     */
    min?: number;
    /**
     * Text to display on the left side of the input
     */
    leftUnits?: string;
    /**
     * Text to display on the right side of the input
     */
    rightUnits?: string;
    /**
     * If set to true this will update the form model after a debounce as the user
     * interacts with the component
     */
    autoUpdateFormModel: boolean;
    /**
     * A reference to the textbox element
     */
    private textboxEl;
    /**
     * The internal form model we use to display the value with formatting
     */
    textboxFormModel: FormControl;
    /** Flag to tell the page we finally computed a greater than zero
     *  width for units (if applicable)
     */
    private unitsWidthCalculated;
    /** Flag used to filter the form models value changes subscription
     *  to prevent the textbox model from being formatted as the form model is updated
     *  programmatically when the textbox model updates
     */
    private autoUpdatingFormModel;
    /**
   * Reference to the textbox input control
   */
    private textboxInput;
    constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, renderer: Renderer2);
    /**
     * Angular AfterViewInit life-cycle hook
     * Subscribe to textbox model value changes if the hosting
     * page has opted in for this component
     */
    ngAfterViewInit(): void;
    /**
     * Angular onChanges life-cycle hook
     * @see {@link https://angular.io/guide/lifecycle-hooks | Life-cycle hooks}
     */
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * Angular onInit lifecycle hook
     * If units is defined, set the position and listen for status changes so we
     * can update the positioning of the units element
     */
    ngOnInit(): void;
    /**
     * Angular afterViewChecked lifecycle hook
     * Show the units element if units is defined. Runs after every ngOnChanges
     */
    ngAfterViewChecked(): void;
    /**
     * Function that builds and returns a ValidatorFn array to set on the form control
     */
    private getValidators;
    /**
     * Focus out event handler for the Textbox component
     */
    onFocusOut(): 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;
    /**
     * When the textbox model updates we need to add some display formatting for
     * display in the textbox and cast the textbox model to a number. Avoid updating
     * the form model when the value doesn't change because listeners will fire for no reason
     */
    private updateFormModelValue;
    /**
     * Convert a number value to the formmated display string. If there is no value
     * return null
     */
    private formatDisplayNumber;
    /**
     * Position the units element and set the padding in the textbox input based
     * on the width of the units element
     */
    private positionRightUnits;
    private positionLeftUnits;
    /**
     * Create and append the units element to the textbox element
     */
    private showUnits;
    private makeUnitElement;
}
