{"version":3,"sources":["../call-control-sdk/lib/pages/common/utils/sort.ts"],"sourcesContent":["/**\r\n * Server-side table sort — sent as `sortBy` / `sortOrder` query params (or body\r\n * fields for the POST dashboard). `sortBy` is the camelCase field of the row\r\n * the column shows; the backend maps it onto its own whitelist.\r\n */\r\nexport type SortOrder = \"asc\" | \"desc\";\r\n\r\nexport interface SortParams {\r\n\tsortBy?: string;\r\n\tsortOrder?: SortOrder;\r\n}\r\n\r\nexport function appendSort(qs: URLSearchParams, params?: SortParams): void {\r\n\tif (!params?.sortBy) return;\r\n\tqs.append(\"sortBy\", params.sortBy);\r\n\tqs.append(\"sortOrder\", params.sortOrder ?? \"asc\");\r\n}\r\n"],"mappings":";;;;;;;;;;;;AAYO,SAAS,WAAW,IAAqB,QAA2B;AAZ3E;AAaC,MAAI,EAAC,iCAAQ,QAAQ;AACrB,KAAG,OAAO,UAAU,OAAO,MAAM;AACjC,KAAG,OAAO,cAAa,YAAO,cAAP,YAAoB,KAAK;AACjD;","names":[]}