import { b as ICondition, a as IFieldConfig, g as IRule } from './IFieldConfig-BGtb2373.js'; /** Configuration for a single wizard step */ interface IWizardStep { /** Unique step identifier */ id: string; /** Step title displayed to the user */ title: string; /** Optional step description */ description?: string; /** Field names included in this step */ fields?: string[]; /** Fragment prefixes included in this step (expanded during resolution). */ fragments?: string[]; /** How fragment sub-wizards render: "inline" flattens steps, "nested" keeps internal nav. */ fragmentWizardMode?: "inline" | "nested"; /** Condition under which this step is visible (uses v2 condition system) */ visibleWhen?: ICondition; } /** Wizard configuration */ interface IWizardConfig { /** Step definitions */ steps: IWizardStep[]; /** If true, users must complete steps in order (no skipping ahead) */ linearNavigation?: boolean; /** If true, validate the current step before allowing navigation */ validateOnStepChange?: boolean; /** If true, save form data when navigating between steps */ saveOnStepChange?: boolean; } /** * Analytics/telemetry callback hooks for form lifecycle events. * * All callbacks are optional -- if not provided, the corresponding events are silently ignored. */ interface IAnalyticsCallbacks { /** Fired when a field receives focus. */ onFieldFocus?: (fieldName: string) => void; /** Fired when a field loses focus. `timeSpentMs` is the duration since the matching onFieldFocus. */ onFieldBlur?: (fieldName: string, timeSpentMs: number) => void; /** Fired when a field value changes. */ onFieldChange?: (fieldName: string, oldValue: unknown, newValue: unknown) => void; /** Fired when field validation fails. */ onValidationError?: (fieldName: string, errors: string[]) => void; /** Fired on successful form submission. `durationMs` is elapsed time since form mount. */ onFormSubmit?: (values: Record, durationMs: number) => void; /** Fired when the user navigates away with unsaved changes. */ onFormAbandonment?: (filledFields: string[], emptyRequiredFields: string[]) => void; /** Fired when the wizard step changes. */ onWizardStepChange?: (fromStep: number, toStep: number) => void; /** Fired when a rule is evaluated. */ onRuleTriggered?: (event: { fieldName: string; ruleIndex: number; conditionMet: boolean; }) => void; } interface ITemplateParamSchema { type: "string" | "number" | "boolean"; enum?: unknown[]; default?: unknown; required?: boolean; } interface ITemplateFieldRef { templateRef: string; templateParams?: Record; templateOverrides?: Record>; defaultValues?: Record; } declare function isTemplateFieldRef(field: IFieldConfig | ITemplateFieldRef): field is ITemplateFieldRef; interface IFormTemplate = Record> { params?: Record; fields: Record; fieldOrder?: string[]; rules?: IRule[]; wizard?: IWizardConfig; ports?: Record; } /** * Top-level form configuration (v2 schema). * * Wraps all field definitions, ordering, wizard config, and form-level settings * into a single versioned object. This replaces the loose Dictionary pattern. */ interface IFormConfig { /** Schema version. Must be 2. */ version: 2; /** Field definitions keyed by field name. */ fields: Record; /** Default field display order. If omitted, uses Object.keys(fields) order. */ fieldOrder?: string[]; /** Inline template definitions. Merged with global registry during resolution. */ templates?: Record; /** Static lookup tables for template expression interpolation. */ lookups?: Record; /** Multi-step wizard configuration. */ wizard?: IWizardConfig; /** Form-level settings. */ settings?: IFormSettings; } /** Form-level settings */ interface IFormSettings { /** Whether the form is in manual save mode (no auto-save on field change). */ manualSave?: boolean; /** Timeout in ms for each save attempt. */ saveTimeoutMs?: number; /** Maximum save retry attempts. */ maxSaveRetries?: number; /** Number of visible fields before collapse. */ expandCutoffCount?: number; /** Max height in px when collapsed. */ collapsedMaxHeight?: number; /** Enable field filter/search input. */ enableFilter?: boolean; /** Analytics/telemetry callbacks for form lifecycle events. */ analytics?: IAnalyticsCallbacks; /** Enable/disable field animations on rule state changes. Default: true. */ animations?: boolean; } export { type IFormConfig as I, type IWizardConfig as a, type IFormSettings as b, type IWizardStep as c, type IAnalyticsCallbacks as d, type IFormTemplate as e, type ITemplateFieldRef as f, type ITemplateParamSchema as g, isTemplateFieldRef as i };