require("../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const { Provider, Context } = (0, require("@pisell/utils").miniRedux)({
	namespace: "state",
	state: {
		data: {},
		schedulesDetail: {
			id: void 0,
			show: false
		},
		currentSelectDayDetail: null,
		tabKey: "products",
		calendar: {
			isEdit: false,
			allData: [],
			editData: []
		},
		schedules: {
			list: [],
			scheduleMap: {},
			scheduleAllMap: {}
		},
		products: {
			list: [],
			search: "",
			currentProduct: null,
			openProductDetailDrawer: false,
			openAddSchedulesDrawer: false
		},
		resources: { cacheResource: null },
		setGlobalState: null
	},
	reducers: {
		setState(state, payload) {
			return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state), payload);
		},
		setGlobalState(state, payload) {
			return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state), payload);
		},
		setProducts(state, payload) {
			return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state), {}, { products: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state.products), payload) });
		},
		setCalendar(state, payload) {
			return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state), {}, { calendar: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state.calendar), payload) });
		},
		setSchedules(state, payload) {
			return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state), {}, { schedules: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state.schedules), payload) });
		},
		setResources(state, payload) {
			return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state), {}, { resources: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state.resources), payload) });
		}
	}
});
//#endregion
exports.Context = Context;
exports.Provider = Provider;
