import { ObjectShape } from 'yup/lib/object';
import { FormStatusLoad, ValidationSchema } from '../../../hook-form/RHFormProvider/types';
import { DynamicFormApiResponse, DynamicFormValues, DynamicFormPropsCoupled } from '../../types';
/**
 * Props for useDynamicFormCoupled.
 * Picked from DynamicFormPropsCoupled (fetch/send and initial data); initialData is optional
 * and nullable since the hook can run without pre-loaded data.
 *
 * In coupled mode you can attach external (sibling) fields to the same form:
 * - siblingInitialValues: initial values for those fields
 * - siblingValidationShape: Yup shape (field name -> schema) for those fields
 * They are merged with the dynamic form values/schema so one RHFormProvider drives both.
 */
export type UseDynamicFormCoupledProps = Pick<DynamicFormPropsCoupled, 'formId' | 'formInstanceId' | 'inputEndpoint' | 'outputEndpoint' | 'formatInputData' | 'formatOutputData' | 'onSubmit'> & {
    /** Pre-loaded form data; when provided, fetch can be skipped or used as fallback. */
    initialData?: DynamicFormApiResponse | null;
    /** Initial values for external fields (merged with dynamic form values). Coupled only. */
    siblingInitialValues?: Record<string, unknown>;
    /** Validation shape for external fields (field name -> Yup schema). Merged with dynamic form schema. Coupled only. */
    siblingValidationShape?: ObjectShape;
};
/**
 * Return type of useDynamicFormCoupled.
 * Combines data/send logic (useDynamicFormData) with schema/values (useDynamicForm)
 * for use when DynamicForm runs in coupled mode (inside an existing RHFormProvider).
 */
export interface UseDynamicFormCoupledReturn {
    /** Raw form data from fetch or initialData (null until loaded). */
    formData: DynamicFormApiResponse | null;
    /** Form data to use for rendering: formData ?? initialData. */
    formDataToUse: DynamicFormApiResponse | null;
    /** Load state for coupled UI (skeleton when not 'ready'). */
    statusLoad: FormStatusLoad;
    /** Submit handler (sends to outputEndpoint or calls onSubmit). */
    handleSubmit: (data: Record<string, unknown>) => Promise<void>;
    /** Initial values for RHFormProvider (from formDataToUse). */
    initialValues: DynamicFormValues;
    /** Validation schema for RHFormProvider (from formDataToUse). */
    validationSchema: ValidationSchema<DynamicFormValues>;
    /** True while a request is in progress. */
    isLoading: boolean;
}
//# sourceMappingURL=types.d.ts.map