import type { FormLabelWidthContext } from './types'; import type { FormItemProp, FormItemProps, FormItemValidateState } from './form-item'; import type { ExtractPropTypes, InjectionKey, SetupContext, UnwrapRef } from 'vue'; import type { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator'; import type { ComponentSize } from '@element-plus-next/constants'; import type { Arrayable } from '@element-plus-next/utils'; export declare const formProps: { readonly model: ObjectConstructor; readonly rules: { readonly type: import("@vue/runtime-core").PropType>>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly labelPosition: import("@element-plus-next/vue-utils").EpPropFinalized; readonly requireAsteriskPosition: import("@element-plus-next/vue-utils").EpPropFinalized; readonly labelWidth: import("@element-plus-next/vue-utils").EpPropFinalized; readonly labelSuffix: import("@element-plus-next/vue-utils").EpPropFinalized; readonly inline: BooleanConstructor; readonly inlineMessage: BooleanConstructor; readonly statusIcon: BooleanConstructor; readonly showMessage: import("@element-plus-next/vue-utils").EpPropFinalized; readonly size: { readonly type: import("@vue/runtime-core").PropType>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly disabled: BooleanConstructor; readonly validateOnRuleChange: import("@element-plus-next/vue-utils").EpPropFinalized; readonly hideRequiredAsterisk: import("@element-plus-next/vue-utils").EpPropFinalized; readonly scrollToError: BooleanConstructor; }; export declare type FormProps = ExtractPropTypes; export declare const formEmits: { validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean; }; export declare type FormEmits = typeof formEmits; export interface FormItemRule extends RuleItem { trigger?: Arrayable; } export declare type FormRules = Partial>>; export declare type FormValidationResult = Promise; export declare type FormValidateCallback = (isValid: boolean, invalidFields?: ValidateFieldsError) => void; export interface FormValidateFailure { errors: ValidateError[] | null; fields: ValidateFieldsError; } export declare type FormContext = FormProps & UnwrapRef & { emit: SetupContext['emit']; addField: (field: FormItemContext) => void; removeField: (field: FormItemContext) => void; resetFields: (props?: Arrayable) => void; clearValidate: (props?: Arrayable) => void; validateField: (props?: Arrayable, callback?: FormValidateCallback) => FormValidationResult; }; export interface FormItemContext extends FormItemProps { $el: HTMLDivElement | undefined; size: ComponentSize; validateState: FormItemValidateState; isGroup: boolean; labelId: string; inputIds: string[]; addInputId: (id: string) => void; removeInputId: (id: string) => void; validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult; resetField(): void; clearValidate(): void; } export declare const formContextKey: InjectionKey; export declare const formItemContextKey: InjectionKey;