// @ts-nocheck
import { queryEndpoint } from "../endpoint/endpoint-client.ts";
import { catalogMakerSql } from "../sql/catalog-maker.ts";

export async function listLanguages(config) {
  const result = await queryEndpoint(config, catalogMakerSql.languages);
  return {
    ...result,
    items: result.items.map((row) => ({
      id: row.id_lang,
      name: row.name,
      isoCode: row.iso_code,
    })),
  };
}
