require("../../../../_virtual/_rolldown/runtime.js");
let react = require("react");
//#region src/plus/saasDevice/devicePlanning/hooks/useDevicePlanningDialogs.ts
const useDevicePlanningDialogs = () => {
	const [addDeviceOpen, setAddDeviceOpen] = (0, react.useState)(false);
	const [detailOpen, setDetailOpen] = (0, react.useState)(false);
	const [selectedDevice, setSelectedDevice] = (0, react.useState)();
	const [detailInitialTab, setDetailInitialTab] = (0, react.useState)("info");
	const [editDeviceOpen, setEditDeviceOpen] = (0, react.useState)(false);
	const [deleteDeviceOpen, setDeleteDeviceOpen] = (0, react.useState)(false);
	const [workAreaModalOpen, setWorkAreaModalOpen] = (0, react.useState)(false);
	const [workAreaModalMode, setWorkAreaModalMode] = (0, react.useState)("create");
	const [editingWorkArea, setEditingWorkArea] = (0, 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
	};
};
//#endregion
exports.useDevicePlanningDialogs = useDevicePlanningDialogs;
