// noinspection JSUnusedGlobalSymbols import type { Vue } from 'vue/types/vue' import type { PluginObject } from 'vue/types/plugin' import type { DefineComponent } from './types/vue' import type { FormularioFormConstructor } from './types/form' import type { ModelGetConverter, ModelSetConverter, ValidationBehaviour, UnregisterBehaviour, } from './types/field' import type { ValidationMessageFn, ValidationMessageI18NFn, ValidationRuleFn, Violation, } from './types/validation' import type { Options } from './types/plugin' declare const FormularioForm: FormularioFormConstructor export { FormularioForm } declare const FormularioField: DefineComponent<{ name: string; value?: unknown; validation?: string|any[]; /** Defaults to 'demand' */ validationBehavior?: ValidationBehaviour; validationRules?: Record; validationMessages?: Record; errorsDisabled?: boolean; modelGetConverter?: ModelGetConverter; modelSetConverter?: ModelSetConverter; /** Defaults to 'none' */ unregisterBehavior?: UnregisterBehaviour; tag?: string; }, { runValidation(): Promise; hasValidationErrors (): Promise; /** @internal */ resetValidation(): void; }> export { FormularioField } declare class Formulario { public validationRules: Record; public validationMessages: Record; constructor (options?: Options); /** Given a set of options, apply them to the pre-existing options. */ public extend (extendWith: Options): Formulario; public runValidation (id: string): Promise>; public resetValidation (id: string): void; /** Used by forms instances to add themselves into a registry */ public register (id: string, form: InstanceType): void; /** Used by forms instances to remove themselves from a registry */ public unregister (id: string): void; /** Get validation rules by merging any passed in with global rules. */ public getRules (extendWith: Record = {}): Record; /** Get validation messages by merging any passed in with global messages. */ public getMessages ( vm: Vue, extendWith: Record ): Record; } export { Formulario } declare module 'vue/types/vue' { interface Vue { readonly $formulario: Formulario; } } declare const VueFormulario: PluginObject & { Formulario: Formulario, } export default VueFormulario