import { default as React } from 'react';
import { default as StepperTypeMap } from './StepperTypeMap';
import { default as StepsCollection } from './StepsCollection';
import { StoredDataOf } from './StepAccessor';
import { default as StepDef } from './StepDef';
import { default as StepHandle } from './StepHandle';
/**
 * Navigation + data surface available via `StepperContext` (i.e. from `useStep`).
 */
type StepperContextValue<TDataMap extends StepperTypeMap = StepperTypeMap> = {
    /**
     * The current step index (0-based). This is always clamped to the range of available steps.
     */
    activeStep: number;
    /**
     * The current step id. This is always clamped to the range of available steps.
     */
    activeStepId: keyof TDataMap & string;
    /**
     * Whether the current step is the first step.
     */
    isFirst: boolean;
    /**
     * Whether the current step is the last step.
     */
    isLast: boolean;
    /**
     * Typed step accessors exposed both as an array (by index) and keyed by step id.
     */
    steps: StepsCollection<TDataMap>;
    /**
     * Navigate to the next step (or a `nextStep` target when configured).
     * Navigation can be blocked by the current step's `onBeforeLeave` guard.
     */
    goNext: () => Promise<void>;
    /**
     * Navigate to the previous step.
     * Navigation can be blocked by the current step's `onBeforeLeave` guard.
     */
    goBack: () => Promise<void>;
    /**
     * Navigate to a specific step by id.
     * Unknown step ids are ignored.
     */
    goTo: <K extends keyof TDataMap & string>(stepId: K) => Promise<void>;
    /**
     * Store typed data for a specific step id.
     */
    setStepData: <K extends keyof TDataMap>(id: K, data: StoredDataOf<TDataMap, K>) => void;
    /**
     * Read stored typed data for a specific step id.
     */
    getStepData: <K extends keyof TDataMap>(id: K) => StoredDataOf<TDataMap, K> | undefined;
    /**
     * Read a snapshot of all stored step data.
     */
    getAllData: () => {
        [K in keyof TDataMap]?: StoredDataOf<TDataMap, K>;
    };
    /**
     * Set the visual status of a step by id.
     * Unknown step ids are ignored.
     */
    setStepStatus: <K extends keyof TDataMap & string>(stepId: K, status: StepDef['status']) => void;
    /**
     * Reset active step, stored data, statuses, and step refs to initial values.
     */
    reset: () => void;
    /**
     * Get a stable ref for a step handle (used for step guards and imperative hooks).
     */
    getStepRef: <K extends keyof TDataMap & string>(stepId: K) => React.RefObject<StepHandle | null>;
};
export default StepperContextValue;
