import type { IndicatorOptions, OverlayOptions, PopoverOptions, PrimitiveValue, StartOptions, StepActionInstruction, StepBehavior, StepHookAction, StepParameters, TargetEventHandler, TargetResolver, TourClassNames, TourControls } from "../types"; /** Recursively makes all properties readonly at any depth. */ export type DeepReadonly = T extends (...arguments_: infer _Arguments) => infer _Return ? T : T extends readonly (infer TEntry)[] ? readonly DeepReadonly[] : T extends object ? { readonly [TKey in keyof T]: DeepReadonly; } : T; /** Step properties (title, content, behavior, and optional display options) excluding id and target. */ export type StepProps = Omit, "id" | "target">; /** Immutable step properties. */ export type ReadonlyStepProps = { readonly title?: T; readonly content: T; readonly data?: Readonly>; readonly overlay?: DeepReadonly; readonly popover?: DeepReadonly; readonly indicator?: DeepReadonly; readonly behavior?: DeepReadonly; readonly controls?: DeepReadonly; readonly classNames?: DeepReadonly; }; /** Immutable tour start options. */ export type ReadonlyStartOptions = DeepReadonly>; /** A single step in a tour workflow (immutable). */ export interface WorkflowStepDefinition { /** Stable identifier, unique within the workflow. */ readonly id: string; readonly target: TargetResolver; readonly props: ReadonlyStepProps; readonly actions: readonly StepActionInstruction[]; readonly targetEvents: readonly TargetEventHandler[]; readonly beforeEnter: StepHookAction | null; readonly beforeLeave: StepHookAction | null; } /** A complete tour workflow definition (immutable). */ export interface WorkflowDefinition { readonly name: string; readonly options: ReadonlyStartOptions; readonly steps: readonly WorkflowStepDefinition[]; }