export default async function importCsvFile(file, collection) {
  var _a, _b, _c;
  const body = new FormData();
  body.append("file", file);
  body.append("type", "import");
  body.append("id", collection);
  body.append("mimeType", "text/csv");
  const res = await fetch(`${((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, "localhost"))
    ? "https://us-central1-ftms-ca85b.cloudfunctions.net"
    : ""}/upload`, {
    method: "POST",
    body,
  });
  console.log(await res.text());
  return [];
}
//# sourceMappingURL=importCsvFile.js.map