import "./chunk-TF3JVVRU.js";
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
function n(r) {
  if (!("indexes" in r)) return console.error("no datasource or indexes found", r), [];
  let t = r.schema?.items?.properties || {};
  return Array.from(new Set(r.indexes?.map((e) => e.fields[0]) ?? [])).map((e) => ({ value: e, title: t[e]?.title || e }));
}
export {
  n as getDatasourceIndexedFieldsWithTitles
};
//# sourceMappingURL=datasources.js.map
