import { type Column } from "./DataTable"; import { type SortState } from "../../lib/columnSort"; import { optionsFromColumns } from "../../lib/sortOptions"; import SortControl from "./SortControl"; // The headerless sort control for views without clickable column headers (the channel manager's and // discovery's card layouts). Now a thin adapter over the generic `SortControl`, feeding it the // column-derived options and a "no sort" default — kept as its own component so the existing call // sites stay untouched and table/cards keep sharing one `SortState`. export default function ColumnSortControl({ columns, sort, onChange, label, defaultLabel, ascLabel, descLabel, }: { columns: Column[]; sort: SortState; onChange: (next: SortState) => void; /** Accessible name for the dropdown (e.g. "Sort"). */ label: string; /** The "no sort / original order" option's text. */ defaultLabel: string; ascLabel: string; descLabel: string; }) { return ( ); }