import { RegisteredRouter } from "@tanstack/react-router"; import { RoutePaths } from "@tanstack/router-core"; import { Dispatch, ReactNode, SetStateAction } from "react"; import { DeepPartial, DefaultValues, UseFormReturn } from "react-hook-form"; import { AnyZodObject, z } from "zod"; import { FormWizardStepFormReturnMap } from "../FormWizard/FormWizard"; import { SimpleStepProps, StepComponentPropsInner, StepDefinitions, StringWithStepKey } from "../FormWizard/useFormWizard"; export type StepFormValidity = "valid" | "invalid"; export interface FormWizardStepWrapperProps, TFullSchema extends AnyZodObject> extends SimpleStepProps { description: string | ReactNode; lastStepPrimaryActionLabel: string; nextStepPath: string | null; basePath: StringWithStepKey<`${RoutePaths}`>; previousStepPath: string | null; onCancel?: (stepKey: string) => void; fullFormSchema: TFullSchema; fullFormState: DefaultValues>; setFullFormState: Dispatch>>>; stepKey: TStepKey; setStepStates: Dispatch, StepFormValidity>>>>; component: (props: StepComponentPropsInner[TStepKey]>, z.TypeOf>) => ReactNode; stepForms: FormWizardStepFormReturnMap; setStepForms: Dispatch]: UseFormReturn[TStepKeyName]>; }>>>; onPrimaryAction?: (form: UseFormReturn[TStepKey]>>) => Promise | void; initialFullFormState: DefaultValues>; } /** * A wrapper component used by the FormWizard component to render each step. * In most cases you should not be using this component directly, but rather use the FormWizard component. */ export declare const FormWizardStepWrapper: >({ stepKey, onCancel, description, title, component, nextStepPath, previousStepPath, lastStepPrimaryActionLabel, fullFormSchema, setFullFormState, fullFormState, stepForms, setStepForms, setStepStates, basePath, containerClassName, onPrimaryAction, initialFullFormState, }: FormWizardStepWrapperProps) => import("react/jsx-runtime").JSX.Element;