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/hooks/useDevicePlanningDialogs.ts
var useDevicePlanningDialogs_exports = {};
__export(useDevicePlanningDialogs_exports, {
  useDevicePlanningDialogs: () => useDevicePlanningDialogs
});
module.exports = __toCommonJS(useDevicePlanningDialogs_exports);
var import_react = require("react");
var useDevicePlanningDialogs = () => {
  const [addDeviceOpen, setAddDeviceOpen] = (0, import_react.useState)(false);
  const [detailOpen, setDetailOpen] = (0, import_react.useState)(false);
  const [selectedDevice, setSelectedDevice] = (0, import_react.useState)();
  const [detailInitialTab, setDetailInitialTab] = (0, import_react.useState)("info");
  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 [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 openDeviceDetail = (record, initialTab) => {
    setSelectedDevice(record);
    setDetailInitialTab(initialTab);
    setDetailOpen(true);
  };
  const closeDeviceDetail = () => {
    setDetailOpen(false);
    setSelectedDevice(void 0);
  };
  const clearSelectedDevice = () => {
    setSelectedDevice(void 0);
  };
  return {
    addDeviceOpen,
    detailOpen,
    selectedDevice,
    detailInitialTab,
    editDeviceOpen,
    deleteDeviceOpen,
    workAreaModalOpen,
    workAreaModalMode,
    editingWorkArea,
    setAddDeviceOpen,
    setDetailOpen,
    setSelectedDevice,
    setDetailInitialTab,
    setEditDeviceOpen,
    setDeleteDeviceOpen,
    setWorkAreaModalOpen,
    openCreateWorkArea,
    openEditWorkArea,
    closeWorkAreaModal,
    openDeviceDetail,
    closeDeviceDetail,
    clearSelectedDevice
  };
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  useDevicePlanningDialogs
});
