const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_store = require("./store.js");
//#region src/plus/skuOptionsSelection/store/actions.ts
const actions = {
	updateDataSource: (dataSource) => {
		require_store.default.setState({ dataSource });
	},
	updateValue: (value) => {
		require_store.default.setState({ value });
	},
	updateConfig: (config) => {
		require_store.default.setState({ config });
	},
	updateSymbol: (symbol) => {
		require_store.default.setState({ symbol });
	},
	updateSelectorDataSource: (selectorDataSource) => {
		require_store.default.setState({ selectorDataSource });
	},
	updateSelectorValue: (selectorValue) => {
		require_store.default.setState({ selectorValue });
	},
	updateSkuCardConfig: (skuCardConfig) => {
		require_store.default.setState((prev) => {
			var _prev$skuCardConfig, _prev$skuCardConfig2, _prev$skuCardConfig3, _prev$skuCardConfig4;
			return { skuCardConfig: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, prev.skuCardConfig || {}), skuCardConfig || {}), {}, {
				title: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ((_prev$skuCardConfig = prev.skuCardConfig) === null || _prev$skuCardConfig === void 0 ? void 0 : _prev$skuCardConfig.title) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.title) || {}),
				subTitle: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ((_prev$skuCardConfig2 = prev.skuCardConfig) === null || _prev$skuCardConfig2 === void 0 ? void 0 : _prev$skuCardConfig2.subTitle) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.subTitle) || {}),
				price: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ((_prev$skuCardConfig3 = prev.skuCardConfig) === null || _prev$skuCardConfig3 === void 0 ? void 0 : _prev$skuCardConfig3.price) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.price) || {}),
				image: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ((_prev$skuCardConfig4 = prev.skuCardConfig) === null || _prev$skuCardConfig4 === void 0 ? void 0 : _prev$skuCardConfig4.image) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.image) || {})
			}) };
		});
	},
	updateCustomConfig: (customConfig) => {
		require_store.default.setState({ customConfig });
	},
	clearStore: () => {
		require_store.default.setState(require_store.initialState);
	}
};
//#endregion
exports.default = actions;
