/** Minimal shape for a draggable tile — previewUrl renders as the thumbnail image; name is only used as its alt-text fallback (else "item-<1-based position>", matching the ordinal badge). */ export interface ReorderItem { /** Stable unique key; used as the drag identity and passed to `onRemove`. */ id: string; /** Image URL rendered as the tile thumbnail. */ previewUrl: string; /** Alt text of the thumbnail; falls back to "item-". */ name?: string; } /** Props for the horizontal drag-reorderable row of image tiles (ReorderList). */ export interface ReorderListProps { /** Heading in uppercase beside the icon above the tiles; empty by default. */ label?: string; /** Tiles in display order; the list is controlled, so update it from `onReorder`. */ items: T[]; /** Fires on every completed drag, even a drop back at the start index — diff the array to detect a real change. */ onReorder: (items: T[]) => void; /** Renders a per-tile "Remove" button; requires onRemove to do anything. */ showRemoveIcon?: boolean; /** Receives the id of the tile whose remove button was pressed; the list does not remove it itself. */ onRemove?: (id: string) => void; }