const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_addService = require("./addService.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/components/ticketBooking/components/addServiceVariant/index.tsx
const AddServiceVariant = (props) => {
	const { globalState, setGlobalState, onPrerenderComplete, onGetProductsReady, productDisplayConfig } = props;
	const stateRef = (0, react.useRef)(globalState);
	stateRef.current = globalState;
	const dispatch = ({ type, payload }) => {
		if (type === "setService") setGlobalState({ service: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, stateRef.current.service), payload) });
		else if (type === "setPet") setGlobalState({ pet: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, stateRef.current.pet), payload) });
	};
	return /* @__PURE__ */ react.default.createElement(require_addService.default, {
		state: globalState,
		dispatch,
		onPrerenderComplete,
		onGetProductsReady,
		productDisplayConfig
	});
};
//#endregion
exports.default = AddServiceVariant;
