import { ExtractPropTypes, PropType, Component } from 'vue'; import { FormLayout, FormLabelAlign, FormSize, FormRule, FormRules, FormRequiredMarkPosition } from '../form/form'; export interface DynamicFormFieldOption { label: string; value: string | number | boolean; disabled?: boolean; description?: string; icon?: string; } export type DynamicFormFieldType = 'text' | 'password' | 'textarea' | 'number' | 'email' | 'search' | 'tel' | 'url' | 'select' | 'checkbox' | 'checkbox-group' | 'radio' | 'radio-group' | 'switch' | 'slider' | 'date' | 'date-range' | 'date-time' | 'time' | 'color' | 'rating' | 'currency' | 'autocomplete' | 'segment' | 'transfer' | 'upload' | 'custom'; export interface DynamicFormField { /** Field key — supports dot notation for nested models (e.g. 'user.name') */ field: string; /** Label text */ label?: string; /** Input type */ type?: DynamicFormFieldType; /** Placeholder text */ placeholder?: string; /** Validation rules */ rules?: FormRule | FormRule[]; /** Force required mark */ required?: boolean; /** Help text below input */ help?: string; /** Tooltip description on label */ description?: string; /** Re-validate when these fields change */ dependencies?: string[]; /** Default value */ defaultValue?: any; /** Options for select, radio-group, checkbox-group, segment, autocomplete, transfer */ options?: DynamicFormFieldOption[] | any[]; /** Textarea rows */ rows?: number; /** Disabled state */ disabled?: boolean; /** Readonly state */ readonly?: boolean; /** Hidden — static boolean or function of model */ hidden?: boolean | ((model: Record) => boolean); /** Column span in grid layout */ span?: number; /** Input mask pattern (for text/tel inputs) */ mask?: string; /** Regex validation pattern (for text inputs) */ regex?: RegExp; /** Clearable input */ clearable?: boolean; /** Max length (for text/textarea) */ maxlength?: number; /** Show word limit counter (for text/textarea) */ showWordLimit?: boolean; /** Trim whitespace (for text inputs) */ trim?: boolean; /** Lazy update on blur (for text inputs) */ lazy?: boolean; /** Debounce time in ms */ debounce?: number; /** From-field key for date-range — splits the array into two separate model keys */ fromField?: string; /** To-field key for date-range — splits the array into two separate model keys */ toField?: string; /** Currency options (for currency type) */ currencyOptions?: { decimal?: string; thousands?: string; prefix?: string; suffix?: string; precision?: number; masked?: boolean; }; /** Pass-through props to the underlying input component */ props?: Record; /** Custom component (used when type is 'custom') */ component?: Component; } export declare const dynamicFormProps: { /** Field schema array */ readonly fields: { readonly type: PropType; readonly required: true; }; /** Reactive model object — if not provided, one is created internally */ readonly model: { readonly type: PropType>; readonly default: undefined; }; /** Form-level rules (merged with per-field rules) */ readonly rules: { readonly type: PropType; readonly default: undefined; }; readonly layout: { readonly type: PropType; readonly default: "vertical"; }; readonly labelWidth: { readonly type: PropType; readonly default: ""; }; readonly labelAlign: { readonly type: PropType; readonly default: "right"; }; readonly labelSuffix: { readonly type: StringConstructor; readonly default: ""; }; readonly size: { readonly type: PropType; readonly default: "default"; }; readonly disabled: { readonly type: BooleanConstructor; readonly default: false; }; readonly loading: { readonly type: BooleanConstructor; readonly default: false; }; readonly showRequiredMark: { readonly type: BooleanConstructor; readonly default: true; }; readonly requiredMarkPosition: { readonly type: PropType; readonly default: "left"; }; readonly validateOnChange: { readonly type: BooleanConstructor; readonly default: true; }; readonly validateOnBlur: { readonly type: BooleanConstructor; readonly default: true; }; readonly hideErrorMessage: { readonly type: BooleanConstructor; readonly default: false; }; readonly scrollToError: { readonly type: BooleanConstructor; readonly default: false; }; readonly statusIcon: { readonly type: BooleanConstructor; readonly default: false; }; readonly showAllErrors: { readonly type: BooleanConstructor; readonly default: false; }; /** Number of columns in grid mode (0 = no grid) */ readonly columns: { readonly type: NumberConstructor; readonly default: 0; }; /** Gap between grid cells */ readonly gutter: { readonly type: NumberConstructor; readonly default: 16; }; }; export declare const dynamicFormEmits: { readonly 'update:model': (model: Record) => boolean; readonly validate: (field: string, valid: boolean, message: string) => boolean; readonly submit: (e: Event) => boolean; }; export type DynamicFormProps = ExtractPropTypes;