import React from 'react'; import { type InputMask, type InputMaskElement, type FactoryOpts, type AllFactoryStaticOpts } from 'imask'; type AnyProps = Record; export type Falsy = false | 0 | "" | null | undefined; export type ReactMaskOpts = FactoryOpts & { unmask?: 'typed' | boolean; }; export type UnmaskValue = Opts['unmask'] extends 'typed' ? InputMask['typedValue'] : Opts['unmask'] extends Falsy ? InputMask['value'] : InputMask['unmaskedValue']; export type ExtractReactMaskOpts> = Extract; export type ReactMaskProps = AnyProps> = { onAccept?: (value: UnmaskValue>, maskRef: InputMask>, e?: InputEvent) => void; onComplete?: (value: UnmaskValue>, maskRef: InputMask>, e?: InputEvent) => void; unmask?: ExtractReactMaskOpts['unmask']; value?: UnmaskValue>; inputRef?: React.Ref; ref?: React.Ref>; }; declare const MASK_PROPS: { [key in keyof (AllFactoryStaticOpts & ReactMaskProps)]: any; }; declare const NON_MASK_OPTIONS_NAMES: readonly ["value", "unmask", "onAccept", "onComplete", "inputRef"]; export type ReactElementProps = Omit, keyof typeof MASK_PROPS>, typeof NON_MASK_OPTIONS_NAMES[number] | 'maxLength'>; type NonMaskProps = AnyProps> = Omit; export type ReactMixinComponent = AnyProps> = React.ComponentType & { inputRef: React.Ref; } & NonMaskProps>; export type MaskPropsKeys = Exclude; export type ExtractMaskOpts> = Extract; export type IMaskMixinProps = Omit, 'ref'> & FactoryOpts; export type IMaskInputProps = ReactElementProps & IMaskMixinProps; export default function IMaskMixin = AnyProps>(ComposedComponent: ReactMixinComponent): React.ForwardRefExoticComponent & React.RefAttributes>>; export {}; //# sourceMappingURL=mixin.d.ts.map