import { c } from "react-compiler-runtime";
import { useEffect } from "react";
import { create } from "zustand";
import { devtools } from "zustand/middleware";
//#region src/stores/inquiryStore.ts
const useInquiryStore = create()(devtools((set) => ({
	title: "",
	setInquiryToolbarTitle: (title) => set((state) => ({ title })),
	workflowMap: {},
	setWorkflowMap: (workflowMap) => set((state) => ({ workflowMap: {
		...state.workflowMap,
		...workflowMap
	} })),
	workflowStarting: false,
	setWorkflowStarting: (workflowStarting) => set((state) => ({ workflowStarting })),
	inquiryMenuHidden: false,
	setInquiryMenuHidden: (inquiryMenuHidden) => set((state) => ({ inquiryMenuHidden }))
})));
const useSetInitialInquiryMenuVisibility = () => {
	const $ = c(3);
	const searchParams = new URLSearchParams(window.location.search);
	const inquiryMenuHidden = searchParams.has("inquiryMenuHidden") === true ? searchParams.get("inquiryMenuHidden") === "true" ? true : false : false;
	const setInquiryMenuHidden = useInquiryStore(_temp);
	let t0;
	let t1;
	if ($[0] !== setInquiryMenuHidden) {
		t0 = () => {
			if (inquiryMenuHidden) setInquiryMenuHidden(true);
		};
		t1 = [setInquiryMenuHidden, inquiryMenuHidden];
		$[0] = setInquiryMenuHidden;
		$[1] = t0;
		$[2] = t1;
	} else {
		t0 = $[1];
		t1 = $[2];
	}
	useEffect(t0, t1);
};
function _temp(state) {
	return state.setInquiryMenuHidden;
}
//#endregion
export { useInquiryStore, useSetInitialInquiryMenuVisibility };

//# sourceMappingURL=inquiryStore.mjs.map