import { t as create } from "../_libs/zustand.mjs";
//#region node_modules/.nitro/vite/services/ssr/assets/central-product-store-TS-vQ8-V.js
var useCentralProductStore = create((set) => ({
	products: [],
	productsById: {},
	setProducts: (products) => {
		const productsById = {};
		products.forEach((p) => {
			productsById[p.id] = p;
		});
		set({
			products,
			productsById
		});
	},
	refetchProducts: null,
	setRefetchProducts: (fn) => set({ refetchProducts: fn })
}));
//#endregion
export { useCentralProductStore as t };
