import { DoCheck, ElementRef, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
import Cleave from 'cleave.js';
import { InputDirective } from '@eui/components/shared';
import * as i0 from "@angular/core";
import * as i1 from "@eui/components/directives";
export interface CleaveInstance extends Cleave {
    initSwapHiddenInput?: () => void;
    initNumeralFormatter?: () => void;
    initTimeFormatter?: () => void;
    initDateFormatter?: () => void;
    initPhoneFormatter?: () => void;
    updateCreditCardPropsByValue?: () => void;
    updateValueState?: () => void;
    callOnValueChanged?: () => void;
    onChange?: (event?: Event) => void;
    onCut?: (event?: Event) => void;
    onFocus?: (event?: Event) => void;
    onCopy?: (event?: Event) => void;
    onKeyDown?: (event?: Event) => void;
    onChangeListener?: (event?: Event) => void;
    onKeyDownListener?: (event?: Event) => void;
    onFocusListener?: (event?: Event) => void;
    onCutListener?: (event?: Event) => void;
    onCopyListener?: (event?: Event) => void;
}
/**
 * Input number component that allows the user to enter a number. It supports number
 * formatting and validation. It uses Cleave.js to format the number. It depends on
 * the {@link LocaleService} to get the current locale and format the number accordingly.
 *
 * It supports the following attributes:
 * - {@link min}: The minimum number can be entered. Blocks user's input if not in range.
 * - {@link max}: The maximum number can be entered. Blocks user's input if not in range.
 * - {@link leadingZero}: Adds leading zero to a number. Formatting will not work.
 * - {@link isInvalid}: Sets the invalid state of the input element.
 * - {@link fractionDigits}: Determines how many digits to show after the decimal point.
 * - {@link digits}: Determines how many digits to show before the decimal point.
 * - {@link fillFraction}: Fills the decimal part with zeros in case it's less than the fractionDigits.
 * - {@link roundUp}: Rounds a number with more than two decimals UP.
 * - {@link noFormat}: Disables the number formatting. It will be treated as a plain number.
 * - {@link value}: The value of the input element.
 * - {@link placeholder}: The placeholder value of the input element.
 * - {@link euiClearable}: Adds a clear button to the input element.
 * - {@link euiLoading}: Adds a loading spinner to the input element.
 * - {@link readonly}: Disables the input element.
 * - {@link disabled}: Disables the input element.
 * - {@link euiDanger}: Sets the invalid state of the input element.
 * - {@link euiSuccess}: Sets the success state of the input element.
 * - {@link euiWarning}: Sets the warning state of the input element.
 * - {@link euiInfo}: Sets the info state of the input element.
 * - {@link euiPrimary}: Sets the primary state of the input element.
 * - {@link euiSecondary}: Sets the secondary state of the input element.
 *
 */
export declare class EuiInputNumberComponent extends InputDirective implements OnInit, OnDestroy, DoCheck, OnChanges {
    /**
     * The minimum number can be entered. Blocks user's input if not in range.
     */
    min: number;
    /**
     * The maximum number can be entered. Blocks user's input if not in range.
     */
    max: number;
    /**
     * Adds leading zero to a number. Formatting will not work.
     *      e.g. with leadingZero=3 input number 5 => 005
     */
    leadingZero: number;
    get isInvalid(): boolean;
    set isInvalid(state: BooleanInput);
    /**
     * CSS classes to be added to the host element.
     */
    get cssClasses(): string;
    /**
     *  determines how many digits to show after the decimal point
     */
    get fractionDigits(): number;
    set fractionDigits(value: NumberInput);
    /**
     * determines how many digits to show before the decimal point
     */
    digits: number;
    /**
     * fills the decimal part with zeros in case it's less than the fractionDigits
     */
    fillFraction: boolean;
    /**
     * rounds a number with more than two decimals UP
     */
    roundUp: number;
    protected _isInvalid: boolean;
    /**
     * Disables the number formatting. It will be treated as a plain number.
     * Will do a thousand grouping of number.
     */
    noFormat: boolean;
    protected type: string;
    /**
     * The value of the input element.
     */
    value: string;
    onChangeCallback: <T>(_: T) => void;
    /**
     * holds an instance of cleave.js
     */
    cleaveInstance: CleaveInstance;
    protected _elementRef: ElementRef;
    protected _renderer: Renderer2;
    /**
     * holds an instance of cleave options for the Cleave instance
     */
    private options;
    private _fractionDigits;
    private localeService;
    private locale_id;
    private document;
    private platformId;
    constructor();
    ngOnInit(): void;
    ngDoCheck(): void;
    ngOnChanges(changes: SimpleChanges): void;
    ngOnDestroy(): void;
    onChange: <T>(_: T) => void;
    onTouched: () => void;
    onPaste(event: ClipboardEvent): void;
    protected onKeyDown(e: KeyboardEvent): void;
    protected onFocusout(): void;
    /**
     * @Override setInvalid setInvalidAttribute of InputDirective
     * Sets the invalid state of the input element.
     *
     * @param state
     */
    protected setInvalid(state?: BooleanInput): void;
    /**
     * @Override setPlaceholder setPlaceholderAttribute of InputDirective
     * Updates the placeholder value based on current number format and given value.
     * If value passed contains characters it doesn't format placeholder.
     * */
    protected setPlaceholderAttribute(value: string | number): void;
    /**
     * instantiate Cleave.js
     */
    private initCleave;
    /**
     * Updates the cleave options by destroying the current instance and creating another one while keeping the previous
     * value.
     */
    private updateOptions;
    /**
     * Callback function of the Cleave instance that is invoked when value is changed.
     *
     * @param event type of CleaveEventOnChange
     */
    private onValueChanged;
    /**
     * responsible to extract all locale information needed to build CleaveOptions related to number format.
     *
     * @param id The id of the locale
     */
    private getCleaveOptsBasedOnLocale;
    /**
     * Applies the fill of decimal part with zeros in case decimal part of given number has
     * size less than the max fraction digits.
     *
     * @param number
     * @param cleaveInstance
     * @private
     */
    private applyFractionFill;
    /**
     * Parses a given formatted number and returns it as a number.
     *
     * @param value The formatted number you want to parse e.g. 111,888.22
     * @param userPrevLocaleState Use previous locale state to parse the value. By default, is false
     * @param replaceSymbol Replace the decimal symbol with a dot. By default, is false
     * @private
     */
    private parseNumber;
    /**
     * Pad leading zero to the number
     *
     * @param num The number to add leading zero to
     * @param size Number of number's leading zero
     * @private
     */
    private padZero;
    /**
     * checks whether the min symbol is allowed. It is allowed when minus symbol
     * provided and min input is undefined or min provided and is negative.
     *
     * @param key The key string coming from an event
     */
    private isMinusAllowed;
    /**
     * check whether the key entered is inside the min and
     * max range. Returns true if it's out of range.
     *
     * @param e A keyboard event
     */
    private isOutSideRange;
    /**
     * Decimal adjustment of a number.
     *
     * @param value The number or string representation of a number.
     * @param exp   The exponent (the 10 logarithm of the adjustment base).
     * @returns The adjusted value.
     */
    private decimalAdjust;
    /**
     * Checks whether a value is defined or not
     *
     * @param value
     */
    private isDefined;
    /**
     * Check if the value is a valid number. Take into account the Big numbers
     * more than 16 digits. Check if string contains only digits and dots.
     * The number value must not be formatted.
     * @param value the value to check
     * @private
     */
    private isItaNumber;
    /**
     * Parse the value to a number. For large numbers, the value is a string.
     * The number value must not be formatted.
     * @param value the value to parse
     * @private
     */
    private parseBigNumber;
    static ɵfac: i0.ɵɵFactoryDeclaration<EuiInputNumberComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<EuiInputNumberComponent, "input[euiInputNumber]", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "leadingZero": { "alias": "leadingZero"; "required": false; }; "isInvalid": { "alias": "isInvalid"; "required": false; }; "fractionDigits": { "alias": "fractionDigits"; "required": false; }; "digits": { "alias": "digits"; "required": false; }; "fillFraction": { "alias": "fillFraction"; "required": false; }; "roundUp": { "alias": "roundUp"; "required": false; }; "noFormat": { "alias": "noFormat"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.EuiClearableDirective; inputs: { "euiClearable": "euiClearable"; "readonly": "readonly"; "disabled": "disabled"; }; outputs: {}; }, { directive: typeof i1.EuiLoadingDirective; inputs: { "euiLoading": "euiLoading"; "readonly": "readonly"; }; outputs: {}; }]>;
    static ngAcceptInputType_min: unknown;
    static ngAcceptInputType_max: unknown;
    static ngAcceptInputType_leadingZero: unknown;
    static ngAcceptInputType_digits: unknown;
    static ngAcceptInputType_fillFraction: unknown;
    static ngAcceptInputType_roundUp: unknown;
    static ngAcceptInputType_noFormat: unknown;
}
//# sourceMappingURL=eui-input-number.component.d.ts.map