import { StatusKey } from 'i18n/types'; import { FieldDescriptor, HydratedElement, QuestionnaireStateKey } from 'types'; import { DescriptorState, HydratedItem, HydratedState } from './types'; type ValidationState = { invalidFields: { [key in QuestionnaireStateKey]?: StatusKey[]; }; }; /** * Collect all possible leaf state-slot keys from a step config, expanding * composites. Emits stateKeys (not registry keys) so the result aligns with * `collectHydratedKeys` and the QuestionnaireState slots that hidden-field * cleanup writes to. */ export declare const collectConfigKeys: (items: string[]) => string[]; /** Collect all visible leaf field keys from a hydrated items tree */ export declare const collectHydratedKeys: (items: HydratedItem[]) => string[]; export declare const hydrateDescriptor: (descriptor: FieldDescriptor, state: DescriptorState, validation: ValidationState) => HydratedElement; /** * Marker that "we're in adaptive mode." Field-level and step-level skip * decisions live on descriptors now (`descriptor.getSkipped`, * `stepDescriptor.getSkipped`), so the hydrator only needs the on/off * signal here. Kept as a type for clarity at function signatures. */ type AdaptiveFields = { active: true; }; export declare const computeAdaptiveFields: (state: DescriptorState) => AdaptiveFields | undefined; /** * Check whether a field is required, gated by visibility. Hidden fields can * never be required — descriptors should declare `getRequired` as the * intrinsic predicate ("required when visible") and let this helper compose * the visibility check. */ export declare const isRequired: (descriptor: FieldDescriptor, state: DescriptorState) => boolean; export declare const hydrateStep: (state: DescriptorState) => Omit | undefined; export {};