const require_asyncToGenerator = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js");
const require_index = require("../../../../utils/index.js");
const require_shared = require("./shared.js");
//#region src/plus/saasDevice/devicePlanning/api/workAreas.ts
const getWorkAreas = function() {
	var _ref = require_asyncToGenerator._asyncToGenerator(function* () {
		const response = yield require_index.request.getRequest().get("/tenant/device/workarea", { relation_count: [
			"smartDevices",
			"dumbDevices",
			"integratedDevices"
		] }, require_shared.CONFIG);
		return (response === null || response === void 0 ? void 0 : response.data) || [];
	});
	return function getWorkAreas() {
		return _ref.apply(this, arguments);
	};
}();
const createWorkArea = function() {
	var _ref2 = require_asyncToGenerator._asyncToGenerator(function* (payload) {
		const response = yield require_index.request.getRequest().post("/tenant/device/workarea", payload, require_shared.CONFIG);
		return (response === null || response === void 0 ? void 0 : response.data) || null;
	});
	return function createWorkArea(_x) {
		return _ref2.apply(this, arguments);
	};
}();
const updateWorkArea = function() {
	var _ref3 = require_asyncToGenerator._asyncToGenerator(function* (id, payload) {
		const response = yield require_index.request.getRequest().put(`/tenant/device/workarea/${id}`, payload, require_shared.CONFIG);
		return (response === null || response === void 0 ? void 0 : response.data) || null;
	});
	return function updateWorkArea(_x2, _x3) {
		return _ref3.apply(this, arguments);
	};
}();
const sortWorkAreas = (ids) => require_index.request.getRequest().post("/tenant/device/workarea/sort", { ids }, require_shared.CONFIG);
const deleteWorkArea = (id) => require_index.request.getRequest().remove(`/tenant/device/workarea/${id}`, {}, require_shared.CONFIG);
const getWorkAreaDetail = function() {
	var _ref4 = require_asyncToGenerator._asyncToGenerator(function* (params) {
		return require_index.request.getRequest().get(`/tenant/device/workarea`, params, require_shared.CONFIG);
	});
	return function getWorkAreaDetail(_x4) {
		return _ref4.apply(this, arguments);
	};
}();
//#endregion
exports.createWorkArea = createWorkArea;
exports.deleteWorkArea = deleteWorkArea;
exports.getWorkAreaDetail = getWorkAreaDetail;
exports.getWorkAreas = getWorkAreas;
exports.sortWorkAreas = sortWorkAreas;
exports.updateWorkArea = updateWorkArea;
