const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_useEngineContext = require("../../hooks/useEngineContext.js");
const require_useWindowSize = require("../../hooks/useWindowSize.js");
const require_index = require("../../businessModel/SalesModel/Sales/index.js");
const require_index$1 = require("../Sales/Step/index.js");
const require_index$2 = require("../Sales/Resource/index.js");
const require_index$3 = require("../Sales/Init/index.js");
const require_index$4 = require("../Sales/index.js");
const require_index$5 = require("./components/Provider/Header/index.js");
const require_index$6 = require("./components/Provider/Footer/index.js");
const require_index$7 = require("./components/Provider/Content/index.js");
const require_locales = require("./locales.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
require("./index.less");
//#region src/components/eventBooking/index.tsx
const Content = () => {
	var _utils$storage;
	const utils = require_useEngineContext.default().appHelper.utils || {};
	_pisell_utils.locales.init(require_locales.default, (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get("umi_locale")) || "en");
	require_useWindowSize.default({ debounceMs: 200 });
	const { data } = require_index.useSales();
	const { getBoardSetting } = require_index$3.useInit();
	const { currentStepData } = require_index$1.useStep();
	const { getResourceList } = require_index$2.useResource();
	const { form_id, shop_id } = data.initData || {};
	(0, react.useEffect)(() => {
		getBoardSetting.run({ item_type: "event_booking_v2" });
	}, []);
	/**
	* @title: 获取资源列表数据
	* @description:
	* @return {*}
	* @Author: WangHan
	* @Date: 2025-01-17 14:25
	*/
	(0, react.useEffect)(() => {
		var _utils$getHistory, _history$location;
		const history = (utils === null || utils === void 0 || (_utils$getHistory = utils.getHistory) === null || _utils$getHistory === void 0 ? void 0 : _utils$getHistory.call(utils)) || {};
		const query = history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 ? void 0 : _history$location.query;
		const params = { front_end_cache_id: (query === null || query === void 0 ? void 0 : query.cacheId) || "" };
		if (query === null || query === void 0 ? void 0 : query.ids) {
			var _query$ids;
			params.event_item_ids = query === null || query === void 0 || (_query$ids = query.ids) === null || _query$ids === void 0 ? void 0 : _query$ids.split(",");
		}
		getResourceList.run(params);
	}, []);
	return /* @__PURE__ */ react.default.createElement("div", { className: `event-booking-wrap ${(0, _pisell_utils.isMobile)() ? "event-booking-mobile-wrap" : ""}` }, /* @__PURE__ */ react.default.createElement(require_index$5.default, null), /* @__PURE__ */ react.default.createElement(require_index$7.default, null), (0, _pisell_utils.isMobile)() && (currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.key) !== "select-category" ? /* @__PURE__ */ react.default.createElement(require_index$6.default, null) : null);
};
const EventBooking = () => {
	return /* @__PURE__ */ react.default.createElement(require_index$4.default, { config: { useSessionStorage: true } }, /* @__PURE__ */ react.default.createElement(Content, null));
};
//#endregion
exports.default = EventBooking;
