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/appDevicePlanning/hooks/useAppDeviceDialogs.ts
var useAppDeviceDialogs_exports = {};
__export(useAppDeviceDialogs_exports, {
  useAppDeviceDialogs: () => useAppDeviceDialogs
});
module.exports = __toCommonJS(useAppDeviceDialogs_exports);
var import_react = require("react");
var useAppDeviceDialogs = () => {
  const [addDeviceOpen, setAddDeviceOpen] = (0, import_react.useState)(false);
  const [takeoverDevice, setTakeoverDevice] = (0, import_react.useState)();
  const [initCheckTakeoverDevice, setInitCheckTakeoverDevice] = (0, import_react.useState)();
  const [selectedDevice, setSelectedDevice] = (0, import_react.useState)();
  const [editDeviceOpen, setEditDeviceOpen] = (0, import_react.useState)(false);
  const [deleteDeviceOpen, setDeleteDeviceOpen] = (0, import_react.useState)(false);
  const [workAreaModalOpen, setWorkAreaModalOpen] = (0, import_react.useState)(false);
  const [workAreaDrawerOpen, setWorkAreaDrawerOpen] = (0, import_react.useState)(false);
  const [workAreaModalMode, setWorkAreaModalMode] = (0, import_react.useState)("create");
  const [editingWorkArea, setEditingWorkArea] = (0, import_react.useState)();
  const openCreateWorkArea = () => {
    setWorkAreaModalMode("create");
    setEditingWorkArea(void 0);
    setWorkAreaModalOpen(true);
  };
  const openEditWorkArea = (record) => {
    setWorkAreaModalMode("edit");
    setEditingWorkArea(record);
    setWorkAreaModalOpen(true);
  };
  const closeWorkAreaModal = () => {
    setWorkAreaModalOpen(false);
    setEditingWorkArea(void 0);
  };
  const closeDeviceDialogs = () => {
    setAddDeviceOpen(false);
    setEditDeviceOpen(false);
    setDeleteDeviceOpen(false);
    setSelectedDevice(void 0);
    setTakeoverDevice(void 0);
    setInitCheckTakeoverDevice(void 0);
  };
  return {
    addDeviceOpen,
    takeoverDevice,
    initCheckTakeoverDevice,
    selectedDevice,
    editDeviceOpen,
    deleteDeviceOpen,
    workAreaModalOpen,
    workAreaDrawerOpen,
    workAreaModalMode,
    editingWorkArea,
    setAddDeviceOpen,
    setTakeoverDevice,
    setInitCheckTakeoverDevice,
    setSelectedDevice,
    setEditDeviceOpen,
    setDeleteDeviceOpen,
    setWorkAreaDrawerOpen,
    openCreateWorkArea,
    openEditWorkArea,
    closeWorkAreaModal,
    closeDeviceDialogs
  };
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  useAppDeviceDialogs
});
