/** Where a step is: finished, happening now, or still ahead. */ export type OrderStepState = "done" | "current" | "upcoming"; /** One stage of an order, e.g. Placed, Packed, Shipped, Out for delivery, Delivered. */ export interface OrderStatusStep { /** Unique key of the step. */ id: string; /** Step name; spoken after its state word. */ label: string; /** Muted line under the label, e.g. "Bengaluru hub". */ detail?: string; /** Pre-formatted date or time, e.g. "Tue, 7 Oct"; for an upcoming step this is the expected date. */ date?: string; /** Picks the marker: check for done, ringed dot for current, hollow ring for upcoming. */ state: OrderStepState; } /** Vertical for a track page, horizontal for a compact strip on the order-success screen. */ export type OrderStatusOrientation = "vertical" | "horizontal"; /** Words read out for each state, so status never rides on the marker alone. */ export interface OrderStatusTimelineLabels { /** Spoken before a completed step's label; defaults to "Completed". */ done: string; /** Spoken before the step in progress; defaults to "In progress". */ current: string; /** Spoken before a step still ahead; defaults to "Upcoming". */ upcoming: string; } /** Order tracking steps as an ordered list; markers pair an icon shape with screen-reader text for each state. */ export interface OrderStatusTimelineProps { /** Stages in order; each step's `state` is given, not derived from position. */ steps: OrderStatusStep[]; /** Layout of the list; defaults to "vertical". */ orientation?: OrderStatusOrientation; /** Overrides the default English state words; unset keys keep their default. */ labels?: Partial; /** Accessible name of the list; defaults to "Order status". */ "aria-label"?: string; /** Test id on the list. */ "data-testid"?: string; }