import { AccessibilityProps, KeyboardHandlerMap, TokenContract } from '../shared/index.js';

type OtpInputType = 'number' | 'text';
interface OtpInputProps {
    length?: number;
    value?: string;
    autoFocus?: boolean;
    type?: OtpInputType;
    disabled?: boolean;
}
interface OtpSlotProps {
    ariaProps: Partial<AccessibilityProps>;
    dataAttributes: Record<string, string>;
    inputProps: {
        maxLength: number;
        inputMode: string;
        pattern?: string;
        autoComplete: string;
        disabled: boolean;
    };
}
interface OtpInputAPI {
    /** Current state */
    state: {
        values: string[];
        focusedIndex: number;
        length: number;
        disabled: boolean;
    };
    /** Set the value at a specific index */
    setValue: (index: number, char: string) => string[];
    /** Get the combined OTP string */
    getValue: () => string;
    /** Move focus in a direction, returns new index */
    moveFocus: (direction: 'left' | 'right') => number;
    /** Get aria/input props for a specific slot */
    getSlotProps: (index: number) => OtpSlotProps;
    /** Keyboard handlers factory for a specific slot */
    getKeyboardHandlers: (index: number, callbacks?: {
        onMoveFocus?: (index: number) => void;
        onSetValue?: (index: number, values: string[]) => void;
    }) => KeyboardHandlerMap;
    /** Parse a paste string into values array */
    parsePaste: (text: string) => string[];
    /** Root container ARIA props */
    rootAriaProps: Partial<AccessibilityProps>;
    /** Whether interaction should be blocked */
    isInteractive: boolean;
}
declare function createOtpInput(props?: OtpInputProps): OtpInputAPI;

declare const otpInputTokens: TokenContract;
declare const otpInputContainerVariants: (props?: ({
    size?: "sm" | "default" | "lg" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const otpInputSlotVariants: (props?: ({
    size?: "sm" | "default" | "lg" | undefined;
    focused?: "true" | "false" | undefined;
    filled?: "true" | "false" | undefined;
} & {
    className?: string;
}) | undefined) => string;

export { type OtpInputAPI, type OtpInputProps, type OtpInputType, type OtpSlotProps, createOtpInput, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens };
