import { create } from "zustand";
import { devtools } from "zustand/middleware";
//#region src/stores/catalogStore.ts
const useCatalogStore = create()(devtools((set) => ({
	currentApiCatalogId: "",
	setCurrentApiCatalogId: (apiCatalogId) => {
		sessionStorage.setItem("current-api-catalog-id", apiCatalogId);
		set((state) => ({ currentApiCatalogId: apiCatalogId }));
	},
	catalogsMap: {},
	setCatalogsMap: (catalogsMap) => set((state) => ({ catalogsMap: {
		...state.catalogsMap,
		...catalogsMap
	} })),
	promotedEntityMap: {},
	setPromotedEntityMap: (promotedEntityMap) => set((state) => ({ promotedEntityMap: {
		...state.promotedEntityMap,
		...promotedEntityMap
	} })),
	promotedMethodEntitiesMap: {},
	setPromotedMethodEntitiesMap: (promotedMethodEntitiesMap) => set((state) => ({ promotedMethodEntitiesMap: {
		...state.promotedMethodEntitiesMap,
		...promotedMethodEntitiesMap
	} }))
})));
//#endregion
export { useCatalogStore };

//# sourceMappingURL=catalogStore.mjs.map