/**
 * Copyright IBM Corp. 2019, 2026
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */
import { NUMBER_INPUT_VALIDATION_STATUS, NUMBER_INPUT_STEP_DIRECTION } from './defs';
import CDSTextInput, { INPUT_SIZE } from '../text-input/text-input';
import { NumberFormatter, NumberParser } from '@carbon/utilities';
export { NUMBER_INPUT_VALIDATION_STATUS };
/**
 * Number input type
 */
export declare enum NUMBER_INPUT_TYPE {
    /**
     * Number type - uses native number input
     */
    NUMBER = "number",
    /**
     * Text type - uses text input with locale-based formatting
     */
    TEXT = "text"
}
/**
 * Number input.
 *
 * @element cds-number-input
 * @fires cds-number-input
 *   The name of the custom event fired after the value is changed upon a user gesture.
 * @slot helper-text - The helper text.
 * @slot label-text - The label text.
 * @slot validity-message - The validity message. If present and non-empty, this input shows the UI of its invalid state.
 */
declare class CDSNumberInput extends CDSTextInput {
    /**
     * The underlying input element
     */
    protected _input: HTMLInputElement;
    /**
     * The current number value (used for type="text")
     */
    protected _numberValue: number;
    /**
     * The previous number value (used for type="text")
     */
    protected _previousNumberValue: number;
    /**
     * The current input text value (used for type="text")
     */
    protected _inputValue: string;
    /**
     * Internal validation state (used for type="text")
     */
    protected _invalid: boolean;
    /**
     * Flag to track if the component has been interacted with by the user
     * Used to prevent defaultValue from overriding user-cleared input
     */
    protected _hasUserInteraction: boolean;
    /**
     * NumberFormatter instance for locale-based formatting
     */
    protected _numberFormatter: NumberFormatter | null;
    /**
     * NumberParser instance for locale-based parsing
     */
    protected _numberParser: NumberParser | null;
    /**
     * Handles `input` event on the `input` in the shadow DOM.
     */
    protected _handleInput(event: Event): void;
    /**
     * Handles `click` event on the down button in the shadow DOM.
     */
    protected _handleUserInitiatedStepDown(): void;
    /**
     * Handles `click` event on the up button in the shadow DOM.
     */
    protected _handleUserInitiatedStepUp(): void;
    /**
     * Handles `focus` event on the `input` in the shadow DOM.
     */
    protected _handleFocus(event: FocusEvent): void;
    /**
     * Handles `blur` event on the `input` in the shadow DOM.
     */
    protected _handleBlur(event: FocusEvent): void;
    /**
     * Handles keyboard events for arrow up/down when type="text"
     */
    protected _handleKeyDown(event: KeyboardEvent): void;
    /**
     * Prevents wheel events from changing the input value.
     */
    protected _preventWheel: (event: WheelEvent) => void;
    protected _min: string;
    protected _max: string;
    protected _step: string;
    /**
     * The minimum value allowed in the input
     */
    get min(): string;
    set min(value: string);
    /**
     * The maximum value allowed in the input
     */
    get max(): string;
    set max(value: string);
    /**
     * The amount the value should increase or decrease by
     */
    get step(): string;
    set step(value: string);
    /**
     * Provide a description for up/down icons that can be read by screen readers
     */
    iconDescription: string;
    /**
     * Aria text for the button that increments the value
     */
    incrementButtonAssistiveText: string;
    /**
     * Aria text for the button that decrements the value
     */
    decrementButtonAssistiveText: string;
    /**
     * Specify whether you want the steppers to be hidden
     */
    hideSteppers: boolean;
    /**
     * `true` to allow empty string.
     */
    allowEmpty: boolean;
    /**
     * Optional starting value for uncontrolled state
     */
    defaultValue: string;
    /**
     * Specify if the wheel functionality for the input should be disabled, or not
     */
    disableWheel: boolean;
    /**
     * Set to true to use the fluid variant.
     */
    isFluid: boolean;
    /**
     * The input box size.
     */
    size: INPUT_SIZE;
    /**
     * **Experimental**: Specify if the input should be of type text or number.
     * Use type="text" with `locale`, `formatOptions`, and guide user input with `pattern` and `inputMode`.
     * @experimental
     */
    type: 'number' | 'text';
    /**
     * **Experimental:** Specify a BCP47 language code for parsing and formatting.
     * Use with `type="text"`, has no effect when `type="number"`.
     * @experimental
     */
    locale: string;
    /**
     * **Experimental:** Specify Intl.NumberFormat options applied to internal number parsing and formatting.
     * Use with `type="text"`, has no effect when `type="number"`.
     * @experimental
     */
    formatOptions: Intl.NumberFormatOptions;
    /**
     * When type="text", provide an optional pattern to restrict user input.
     */
    pattern: string;
    /**
     * Instruct the browser which keyboard to display on mobile devices.
     */
    inputMode: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
    /**
     * Provide the value stepping should begin at when the input is empty
     */
    stepStartValue: number;
    /**
     * Optional validation function for type="text".
     * Should return false to fail validation, true to pass, or undefined to defer to built-in validation.
     * Note: the min and max attributes still takes priority if they are defined.
     */
    validate?: (value: string, locale: string) => boolean | undefined;
    /**
     * Override value setter to handle formatting for type="text"
     */
    get value(): string;
    set value(val: string);
    /**
     * Initialize formatters when component connects
     */
    connectedCallback(): void;
    /**
     * Called before updates to initialize default value
     */
    willUpdate(changedProperties: Map<string, unknown>): void;
    /**
     * Update formatters when properties change
     */
    updated(changedProperties: Map<string, unknown>): void;
    /**
     * Initialize NumberFormatter and NumberParser instances
     */
    protected _initializeFormatters(): void;
    /**
     * Get input validity
     */
    _getInputValidity(): boolean;
    /**
     * Get decimal places from a number
     */
    getDecimalPlaces: (num: number) => number;
    /**
     * Clamp a value between min and max
     */
    protected _clamp(value: number, min: number, max: number): number;
    /**
     * Handle stepping up or down
     * @returns true if the value changed, false if it was clamped to the same value
     */
    protected _handleStep(direction: NUMBER_INPUT_STEP_DIRECTION): boolean;
    /**
     * Handles incrementing the value in the input
     */
    stepUp(): void;
    /**
     * Handles decrementing the value in the input
     */
    stepDown(): void;
    protected _getInputValue(): string;
    protected _dispatchInputEvent(value: string | number, direction: NUMBER_INPUT_STEP_DIRECTION): void;
    /**
     * Synchronizes text mode state by formatting a numeric value and updating all related state variables.
     * This centralizes the logic for managing _numberValue, _inputValue, _previousNumberValue, and _value.
     *
     * @param numericValue - The numeric value to format and synchronize
     * @param updateInput - Whether to update the DOM input element (default: false)
     */
    protected _syncTextModeState(numericValue: number, updateInput?: boolean): void;
    render(): import("lit-html").TemplateResult<1>;
    /**
     * The name of the custom event fired after the value is changed upon a user gesture.
     */
    static get eventInput(): string;
    static shadowRootOptions: {
        delegatesFocus: boolean;
        clonable?: boolean;
        customElementRegistry?: CustomElementRegistry;
        mode: ShadowRootMode;
        serializable?: boolean;
        slotAssignment?: SlotAssignmentMode;
    };
    static styles: any;
}
export default CDSNumberInput;
//# sourceMappingURL=number-input.d.ts.map