import { default as StepDef, StepDefBase } from './StepDef';
import { default as StepperTypeMap } from './StepperTypeMap';
/**
 * Extract stored-data type from a slot's `__stored` brand.
 * Falls back to `unknown` when the slot doesn't declare one.
 */
type StoredDataOf<TDataMap extends StepperTypeMap, K extends keyof TDataMap> = TDataMap[K] extends {
    __stored?: infer T;
} ? T : unknown;
/**
 * Author's slot fields, with the reserved `__stored` brand removed so it never
 * leaks into the authored runtime step shape.
 */
type InitialDataOf<TDataMap extends StepperTypeMap, K extends keyof TDataMap> = Omit<TDataMap[K], '__stored'>;
/**
 * Per-step config = framework base + literal id + author's custom slot fields.
 */
type StepDataOf<TDataMap extends StepperTypeMap, K extends keyof TDataMap & string> = StepDefBase & {
    id: K;
} & InitialDataOf<TDataMap, K>;
/**
 * @deprecated Use `StoredDataOf<TDataMap, K>` instead.
 */
type InferStepData<TSlot> = TSlot extends {
    __stored?: infer T;
} ? T : unknown;
/**
 * Read-only accessor for a single step.
 */
type StepAccessor<TDataMap extends StepperTypeMap, K extends keyof TDataMap = keyof TDataMap> = {
    /** Initial step configuration passed to `useStepper` — typed per-slot when K is narrowed. */
    initialData: K extends keyof TDataMap & string ? StepDataOf<TDataMap, K> : StepDef<TDataMap>;
    /** Stored data for this step, typed from the slot's `__stored` brand. */
    storedData: StoredDataOf<TDataMap, K> | undefined;
    /** Zero-based step index. */
    index: number;
    /** Current visual status of this step. */
    status: StepDef['status'];
};
export type { InferStepData, StepDataOf, StoredDataOf, InitialDataOf };
export default StepAccessor;
