import { type Ref } from 'react';
import { type BigIntFormatOptions } from '@graphprotocol/gds-utils';
import type { InputProps } from '../components/Input.tsx';
export interface UseNumberInputOptions<UseBigInt extends boolean = false, T = UseBigInt extends true ? bigint : number> {
    ref?: Ref<HTMLInputElement> | undefined;
    /** @default false */
    useBigInt?: UseBigInt | undefined;
    /** @default 18n */
    precision?: bigint | undefined;
    /** @default null */
    defaultValue?: T | null | undefined;
    value?: T | null | undefined;
    onChange?: ((value: T | null) => void) | undefined;
    /** @default false */
    required?: boolean | undefined;
    /** @default null */
    min?: T | null | undefined;
    /** @default null */
    max?: T | null | undefined;
    /**
     * @default {
     *   minimumFractionDigits: 0
     *   maximumFractionDigits: 20
     *   trailingZeroDisplay: 'auto'
     * }
     */
    format?: BigIntFormatOptions | undefined;
}
export type UseNumberInputError = 'NOT_A_NUMBER' | 'EMPTY' | 'BELOW_MIN' | 'ABOVE_MAX';
export interface UseNumberInputReturnedObject<T = number | bigint> {
    /**
     * `null` means the input is either empty or invalid (or both, if `required` is true); check
     * `error` for more info.
     */
    value: T | null;
    setValue: (value: T | null) => void;
    error: UseNumberInputError | null;
    nonValidatedValue: bigint | null;
    nearestValidValue: T;
    props: {
        ref: Ref<HTMLInputElement>;
        type: 'number';
        value: InputProps['value'];
        onKeyDown: InputProps['onKeyDown'];
        onChange: InputProps['onChange'];
        onBlur: InputProps['onBlur'];
        required?: InputProps['required'] | undefined;
        min?: InputProps['min'] | undefined;
        max?: InputProps['max'] | undefined;
        status?: InputProps['status'] | undefined;
        message?: InputProps['message'] | undefined;
    };
}
export declare function useNumberInput<UseBigInt extends boolean = false, T = UseBigInt extends true ? bigint : number>({ ref: passedRef, useBigInt, precision, defaultValue, value: controlledValue, onChange: controlledOnChange, required, min: passedMin, max: passedMax, format, }?: UseNumberInputOptions<UseBigInt>): UseNumberInputReturnedObject<T>;
//# sourceMappingURL=useNumberInput.d.ts.map