var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/plus/saasDevice/devicePlanning/api/workAreas.ts
var workAreas_exports = {};
__export(workAreas_exports, {
  createWorkArea: () => createWorkArea,
  deleteWorkArea: () => deleteWorkArea,
  getWorkAreaDetail: () => getWorkAreaDetail,
  getWorkAreas: () => getWorkAreas,
  sortWorkAreas: () => sortWorkAreas,
  updateWorkArea: () => updateWorkArea
});
module.exports = __toCommonJS(workAreas_exports);
var import_utils = require("../../../../utils");
var import_shared = require("./shared");
var getWorkAreas = async () => {
  const response = await import_utils.request.getRequest().get(
    "/tenant/device/workarea",
    {
      relation_count: ["smartDevices", "dumbDevices", "integratedDevices"]
    },
    import_shared.CONFIG
  );
  return (response == null ? void 0 : response.data) || [];
};
var createWorkArea = async (payload) => {
  const response = await import_utils.request.getRequest().post(
    "/tenant/device/workarea",
    payload,
    import_shared.CONFIG
  );
  return (response == null ? void 0 : response.data) || null;
};
var updateWorkArea = async (id, payload) => {
  const response = await import_utils.request.getRequest().put(
    `/tenant/device/workarea/${id}`,
    payload,
    import_shared.CONFIG
  );
  return (response == null ? void 0 : response.data) || null;
};
var sortWorkAreas = (ids) => import_utils.request.getRequest().post("/tenant/device/workarea/sort", { ids }, import_shared.CONFIG);
var deleteWorkArea = (id) => import_utils.request.getRequest().remove(`/tenant/device/workarea/${id}`, {}, import_shared.CONFIG);
var getWorkAreaDetail = async (params) => import_utils.request.getRequest().get(`/tenant/device/workarea`, params, import_shared.CONFIG);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  createWorkArea,
  deleteWorkArea,
  getWorkAreaDetail,
  getWorkAreas,
  sortWorkAreas,
  updateWorkArea
});
