import type { WizardStepDef } from "./types";
/** Options for {@link useWizardState}. */
export interface UseWizardStateOptions<TData> {
    /** Ordered step definitions — determines wizard length and validation. */
    readonly steps: readonly WizardStepDef<TData>[];
    /** Initial form data (empty/default values for all fields). */
    readonly initialData: TData;
}
/** Return value of {@link useWizardState}. */
export interface UseWizardStateReturn<TData> {
    /** Zero-based index of the current step. */
    readonly currentStepIndex: number;
    /** Definition of the current step. */
    readonly currentStep: WizardStepDef<TData>;
    /** Accumulated form data across all steps. */
    readonly data: TData;
    /** Merges a partial update into the accumulated data. */
    readonly updateData: (partial: Partial<TData>) => void;
    /** Whether navigation forward is allowed (current step is valid). */
    readonly canGoNext: boolean;
    /** Whether navigation backward is possible (not on first step). */
    readonly canGoBack: boolean;
    /** Advance to the next step (validates current step first). */
    readonly goNext: () => void;
    /** Return to the previous step. */
    readonly goBack: () => void;
    /** Jump directly to a specific step (only allows going backward). */
    readonly goToStep: (index: number) => void;
    /** Validation error for the current step, or `null`. */
    readonly validationError: string | null;
    /** `true` when on the first step. */
    readonly isFirstStep: boolean;
    /** `true` when on the last step. */
    readonly isLastStep: boolean;
}
/**
 * Headless state machine for multi-step wizard flows.
 *
 * Manages step navigation, per-step validation gating, and accumulated
 * form data. Generic over the data shape — each wizard defines its own
 * `TData` type with fields for all steps.
 *
 * Navigation forward is gated by the current step's `validate` function.
 * Navigation backward is always allowed. Direct step jumps only go backward
 * (prevents skipping required steps).
 *
 * Follows the `useReducer` + discriminated union pattern established
 * by `agentSetupReducer` — pure state transitions, imperative API on top.
 *
 * @typeParam TData - Accumulated form data shape.
 *
 * @example
 * ```tsx
 * const wizard = useWizardState({
 *   steps: [
 *     { id: "basics", label: "Basics", validate: (d) => d.name ? null : "Name is required" },
 *     { id: "review", label: "Review" },
 *   ],
 *   initialData: { name: "", description: "" },
 * });
 *
 * // wizard.data.name, wizard.updateData({ name: "My Agent" })
 * // wizard.goNext(), wizard.goBack()
 * ```
 */
export declare function useWizardState<TData>(options: UseWizardStateOptions<TData>): UseWizardStateReturn<TData>;
//# sourceMappingURL=useWizardState.d.ts.map