import * as vue from 'vue'; import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, Ref, PropType } from 'vue'; type SlotsToProps> = { $children?: (VNodeChild | (T extends { default: infer V; } ? V : {}) | { [K in keyof T]?: T[K]; }); 'v-slots'?: { [K in keyof T]?: T[K] | false; }; } & { [K in keyof T as `v-slot:${K & string}`]?: T[K] | false; }; type RawSlots = Record; type Slot = [T] extends [never] ? () => VNodeChild : (arg: T) => VNodeChild; type VueSlot = [T] extends [never] ? () => VNode[] : (arg: T) => VNode[]; type MakeInternalSlots = { [K in keyof T]: Slot; }; type MakeSlots = { [K in keyof T]: VueSlot; }; type GenericProps> = { $props: Props & SlotsToProps; $slots: MakeSlots; }; interface FilterPropsOptions, Props = ExtractPropTypes> { filterProps, U extends Exclude>>(props: T): Partial>; } type MaybeRef = T | Ref; type EventProp void> = F; declare const EventProp: () => PropType<(...args: T) => void>; type ValidationResult = string | boolean; type ValidationRule = ValidationResult | PromiseLike | ((value: any) => ValidationResult) | ((value: any) => PromiseLike); type ValidateOnValue = 'blur' | 'input' | 'submit'; interface ValidationProps { disabled: boolean | null; error: boolean; errorMessages: string | readonly string[] | null; focused: boolean; maxErrors: string | number; name: string | undefined; label: string | undefined; readonly: boolean | null; rules: readonly ValidationRule[]; modelValue: any; 'onUpdate:modelValue': EventProp | undefined; validateOn?: ValidateOnValue | `${ValidateOnValue} lazy` | `lazy ${ValidateOnValue}` | 'lazy'; validationValue: any; } declare function useValidation(props: ValidationProps, name?: string, id?: MaybeRef): { errorMessages: vue.ComputedRef; isDirty: vue.ComputedRef; isDisabled: vue.ComputedRef; isReadonly: vue.ComputedRef; isPristine: vue.ShallowRef; isValid: vue.ComputedRef; isValidating: vue.ShallowRef; reset: () => void; resetValidation: () => void; validate: (silent?: boolean) => Promise; validationClasses: vue.ComputedRef<{ [x: string]: boolean; }>; }; type VValidationSlots = { default: ReturnType; }; declare const VValidation: { new (...args: any[]): vue.CreateComponentPublicInstance<{ error: boolean; disabled: boolean | null; readonly: boolean | null; focused: boolean; errorMessages: string | readonly string[] | null; maxErrors: string | number; rules: readonly ValidationRule[]; } & { name?: string | undefined; label?: string | undefined; 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined; validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined; validationValue?: any; } & {}, () => vue.VNode[] | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{ 'update:modelValue': (value: any) => boolean; }, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "update:modelValue">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & { error: boolean; disabled: boolean | null; readonly: boolean | null; focused: boolean; errorMessages: string | readonly string[] | null; maxErrors: string | number; rules: readonly ValidationRule[]; } & { name?: string | undefined; label?: string | undefined; 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined; validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined; validationValue?: any; } & {}, { error: boolean; disabled: boolean | null; readonly: boolean | null; focused: boolean; errorMessages: string | readonly string[] | null; maxErrors: string | number; rules: readonly ValidationRule[]; }, true, {}, vue.SlotsType; isDirty: vue.ComputedRef; isDisabled: vue.ComputedRef; isReadonly: vue.ComputedRef; isPristine: vue.ShallowRef; isValid: vue.ComputedRef; isValidating: vue.ShallowRef; reset: () => void; resetValidation: () => void; validate: (silent?: boolean) => Promise; validationClasses: vue.ComputedRef<{ [x: string]: boolean; }>; }) => vue.VNode[]; }>>, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, { error: boolean; disabled: boolean | null; readonly: boolean | null; focused: boolean; errorMessages: string | readonly string[] | null; maxErrors: string | number; rules: readonly ValidationRule[]; } & { name?: string | undefined; label?: string | undefined; 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined; validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined; validationValue?: any; } & {}, () => vue.VNode[] | undefined, {}, {}, {}, { error: boolean; disabled: boolean | null; readonly: boolean | null; focused: boolean; errorMessages: string | readonly string[] | null; maxErrors: string | number; rules: readonly ValidationRule[]; }>; __isFragment?: undefined; __isTeleport?: undefined; __isSuspense?: undefined; } & vue.ComponentOptionsBase<{ error: boolean; disabled: boolean | null; readonly: boolean | null; focused: boolean; errorMessages: string | readonly string[] | null; maxErrors: string | number; rules: readonly ValidationRule[]; } & { name?: string | undefined; label?: string | undefined; 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined; validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined; validationValue?: any; } & {}, () => vue.VNode[] | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{ 'update:modelValue': (value: any) => boolean; }, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "update:modelValue">, string, { error: boolean; disabled: boolean | null; readonly: boolean | null; focused: boolean; errorMessages: string | readonly string[] | null; maxErrors: string | number; rules: readonly ValidationRule[]; }, {}, string, vue.SlotsType; isDirty: vue.ComputedRef; isDisabled: vue.ComputedRef; isReadonly: vue.ComputedRef; isPristine: vue.ShallowRef; isValid: vue.ComputedRef; isValidating: vue.ShallowRef; reset: () => void; resetValidation: () => void; validate: (silent?: boolean) => Promise; validationClasses: vue.ComputedRef<{ [x: string]: boolean; }>; }) => vue.VNode[]; }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new (props: { modelValue?: T | null | undefined; 'onUpdate:modelValue'?: ((value: T | null) => void) | undefined; }, slots: VValidationSlots) => GenericProps<{ modelValue?: T | null | undefined; 'onUpdate:modelValue'?: ((value: T | null) => void) | undefined; }, VValidationSlots>) & FilterPropsOptions<{ focused: BooleanConstructor; 'onUpdate:focused': vue.PropType<(args_0: boolean) => void>; disabled: { type: vue.PropType; default: null; }; error: BooleanConstructor; errorMessages: { type: vue.PropType; default: () => never[]; }; maxErrors: { type: (StringConstructor | NumberConstructor)[]; default: number; }; name: StringConstructor; label: StringConstructor; readonly: { type: vue.PropType; default: null; }; rules: { type: vue.PropType; default: () => never[]; }; modelValue: null; validateOn: vue.PropType<"lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined>; validationValue: null; }, vue.ExtractPropTypes<{ focused: BooleanConstructor; 'onUpdate:focused': vue.PropType<(args_0: boolean) => void>; disabled: { type: vue.PropType; default: null; }; error: BooleanConstructor; errorMessages: { type: vue.PropType; default: () => never[]; }; maxErrors: { type: (StringConstructor | NumberConstructor)[]; default: number; }; name: StringConstructor; label: StringConstructor; readonly: { type: vue.PropType; default: null; }; rules: { type: vue.PropType; default: () => never[]; }; modelValue: null; validateOn: vue.PropType<"lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined>; validationValue: null; }>>; type VValidation = InstanceType; export { VValidation };