import { type Column } from "../components/tableHeader"; import { type SortOption } from "./columnSort"; /** The `SortOption[]` a table exposes for sorting — its sortable columns, labelled by header. Bridges * the `Column` contract to the source-agnostic sort vocabulary the shared `SortControl` consumes. */ export function optionsFromColumns(columns: Column[]): SortOption[] { return columns .filter((c) => c.sortable && c.sortValue) .map((c) => ({ key: c.key, label: c.header })); }