import { ActionWithContext } from '@mui/base/utils/useControllableReducer.types';
import { NumberInputAction } from './NumberInputActions';
export type StepDirection = 'up' | 'down';
/**
 * The internal state of the NumberInput.
 * Modify via the reducer only.
 */
export interface NumberInputState {
    /**
     * The clamped `value` of the `input` element.
     */
    value: number | null;
    /**
     * The dirty `value` of the `input` element when it is in focus.
     */
    inputValue: string;
    /**
     * como el useReducerController da prioridad al valor controlado, se agrega esta propiedad para poder comparar el value con el inputValue, antes de que se actualice el value por las props.
     */
    noControlledValue: number | null;
}
/**
 * Additional props passed to the number input reducer actions.
 */
export type NumberInputActionContext = {
    min?: number;
    max?: number;
    step?: number;
    withDecimal?: boolean;
    shiftMultiplier: number;
    /**
     * A function that parses the raw input value
     */
    getInputValueAsString: (val: string) => string;
};
export type NumberInputReducerAction = ActionWithContext<NumberInputAction, NumberInputActionContext>;
export interface UseNumberInputParameters {
    /**
     * The minimum value.
     */
    min?: number;
    /**
     * The maximum value.
     */
    max?: number;
    /**
     * The amount that the value changes on each increment or decrement.
     */
    step?: number;
    /**
     * Multiplier applied to `step` if the shift key is held while incrementing
     * or decrementing the value. Defaults to `10`.
     */
    shiftMultiplier?: number;
    /**
     * The default value. Use when the component is not controlled.
     */
    defaultValue?: number | null;
    /**
     * If `true`, the component is disabled.
     * The prop defaults to the value (`false`) inherited from the parent FormControl component.
     */
    disabled?: boolean;
    /**
     * Indica mientras se esta digitando el valor está en error
     * The prop defaults to the value (`false`) inherited from the parent FormControl component.
     */
    unsavedValueError?: boolean;
    /**
     * If `true`, the `input` will indicate an error by setting the `aria-invalid` attribute.
     * The prop defaults to the value (`false`) inherited from the parent FormControl component.
     */
    error?: boolean;
    onBlur?: (event?: React.FocusEvent<HTMLInputElement>) => void;
    onClick?: React.MouseEventHandler;
    /**
     * Callback fired when the `input` value changes after each keypress, before clamping is applied.
     * Note that `event.target.value` may contain values that fall outside of `min` and `max` or
     * are otherwise "invalid".
     * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
     */
    onInputChange?: React.ChangeEventHandler<HTMLInputElement>;
    onFocus?: React.FocusEventHandler;
    /**
     * Callback fired after the value is clamped and changes - when the `input` is blurred or when
     * the stepper buttons are triggered.
     * Called with `undefined` when the value is unset.
     * @param {React.FocusEvent<HTMLInputElement>|React.PointerEvent|React.KeyboardEvent} event The event source of the callback
     * @param {number|undefined} value The new value of the component
     */
    onChange?: (event: React.FocusEvent<HTMLInputElement> | React.PointerEvent | React.KeyboardEvent, value: number | null) => void;
    /**
     * The `id` attribute of the input element.
     */
    inputId?: string;
    /**
     * The ref of the input element.
     */
    inputRef?: React.Ref<HTMLInputElement>;
    /**
     * If `true`, the `input` element is required.
     * The prop defaults to the value (`false`) inherited from the parent FormControl component.
     */
    required?: boolean;
    /**
     * If `true`, the `input` element becomes read-only. The stepper buttons remain active,
     * with the addition that they are now keyboard focusable.
     * @default false
     */
    readOnly?: boolean;
    /**
     * The current value. Use when the component is controlled.
     * @default null
     */
    value?: number | null;
    /**
     * The name of the component using useNumberInput.
     * For debugging purposes.
     * @default 'useNumberInput'
     */
    componentName?: string;
    /**
     * Cuando puede soportar decimales
     */
    withDecimal?: boolean;
}
//# sourceMappingURL=types.d.ts.map