import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { miniRedux } from "@pisell/utils";
const { Provider, Context } = miniRedux({
	namespace: "state",
	state: {},
	reducers: {
		setState(state, payload) {
			return _objectSpread2(_objectSpread2({}, state), payload);
		},
		setPayment(state, payload) {
			state.setGlobalState(_objectSpread2(_objectSpread2({}, state), {}, { payment: _objectSpread2(_objectSpread2({}, state.payment), payload) }));
		},
		setStatus(state, payload) {
			let _val = { appointment_status: payload };
			if (payload === "cancelled") _val.disabledEdit = true;
			else _val.disabledEdit = false;
			state.setGlobalState(_val);
		}
	}
});
//#endregion
export { Context, Provider };
