import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import dayjs from "dayjs";
import { miniRedux } from "@pisell/utils";
const { Provider, Context } = miniRedux({
	namespace: "state",
	state: {
		amountSymbol: "$",
		apis: {
			getClients: () => {
				return [];
			},
			getServices: () => {
				return [];
			},
			getResources: () => {
				return [];
			},
			getProducts: () => {
				return [];
			},
			getPets: () => {
				return [];
			},
			getForms: () => {
				return [];
			},
			getFormData: () => {
				return [];
			},
			getContactsInfo: () => {
				return null;
			}
		},
		client: {
			showModal: false,
			clients: [],
			value: {
				id: 0,
				nickname: "Select a customer"
			}
		},
		date: {
			value: dayjs(),
			end_date: dayjs().add(1, "days")
		},
		service: {
			addModal: false,
			editModal: false,
			services: [],
			resources: [],
			value: [],
			cacheItem: null
		},
		pet: {
			showModal: false,
			pets: [],
			value: [],
			formData: null,
			originValue: null
		},
		addons: {
			showModal: false,
			value: [],
			productList: [],
			originData: []
		},
		form: {
			value: {},
			forms: []
		},
		notes: {
			orderNote: "",
			internalNotes: []
		},
		setGlobalState: () => {},
		bookingConfig: { basic: {
			service_time: {
				unit: "minute",
				value: 3
			},
			appointment_mode: "multiple_appointments_mode",
			appointment_subject: {
				type: "form",
				form_id: 247,
				form_record_id: 246
			}
		} },
		bookingDetail: null,
		action: (props) => {
			console.log(props);
		},
		bookingId: 0,
		activeCartId: [0]
	},
	reducers: { setState(state, payload) {
		return _objectSpread2(_objectSpread2({}, state), payload);
	} }
});
//#endregion
export { Context, Provider };
