const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_useEngineContext = require("../../../../hooks/useEngineContext.js");
const require_SalesSdkProvider = require("../../context/SalesSdkProvider.js");
const require_createCompositeOpenProductDetailHost = require("../../hosts/createCompositeOpenProductDetailHost.js");
const require_createOpenBookingEditHost = require("../../hosts/createOpenBookingEditHost.js");
const require_createOpenMultiDaySelectHost = require("../../hosts/createOpenMultiDaySelectHost.js");
const require_createOpenHolderSelectHost = require("../../hosts/createOpenHolderSelectHost.js");
const require_DemoHostRuntimeBridge = require("./DemoHostRuntimeBridge.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/plus/salesSdk/demo/components/SalesSdkDemoTabShell.tsx
const _excluded = ["children", "uiHosts"];
/**
* Demo 专用：在 create/edit Tab 外包一层 Provider，并注入 legacy Info2 商品弹窗 Host。
*
* - `openProductDetail` → 普通商品 SkuDetailModal + 预约商品 `pisell1.handleOpenProductModal`
* - `openBookingEdit` → SalesSdk `BookingEditServiceDrawer`（Info2 editService 无 miniRedux 版）
* - 运行时 customerId / date 通过 ref + DemoHostRuntimeBridge 同步
*/
const SalesSdkDemoTabShell = (_ref) => {
	var _context$appHelper;
	let { children, uiHosts: _ignoredUiHosts } = _ref, providerProps = require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
	const context = require_useEngineContext.default();
	const action = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.action;
	const runtimeRef = (0, react.useRef)({
		date: void 0,
		customerId: void 0
	});
	const uiHosts = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, action ? { openProductDetail: require_createCompositeOpenProductDetailHost.createCompositeOpenProductDetailHost({
		action,
		getRuntime: () => runtimeRef.current
	}) } : {}), {}, {
		openBookingEdit: require_createOpenBookingEditHost.createOpenBookingEditHost(),
		openMultiDaySelect: require_createOpenMultiDaySelectHost.createOpenMultiDaySelectHost(),
		openHolderSelect: require_createOpenHolderSelectHost.createOpenHolderSelectHost()
	}), [action]);
	return /* @__PURE__ */ react.default.createElement(require_SalesSdkProvider.SalesSdkProvider, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, providerProps), {}, { uiHosts }), /* @__PURE__ */ react.default.createElement(require_DemoHostRuntimeBridge.DemoHostRuntimeBridge, { runtimeRef }), children);
};
//#endregion
exports.SalesSdkDemoTabShell = SalesSdkDemoTabShell;
