import { isBooking4Shop } from "./utils.js";
import useEngineContext from "../../../hooks/useEngineContext.js";
import Info from "../info2/index.js";
import Info$1 from "./main.js";
import React from "react";
import { Skeleton } from "antd";
//#region src/components/booking/info/index.tsx
const APP = (props) => {
	var _context$appHelper, _context$appHelper$ge, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3;
	const context = useEngineContext();
	const { globalState } = props;
	const shopId = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getData) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper, "shop_id")) || ((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.global) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.globalConfig) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.id);
	const isBooking4 = isBooking4Shop(shopId, globalState === null || globalState === void 0 ? void 0 : globalState.renderType, (_context$appHelper$ut3 = context.appHelper.utils) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.businessUtils);
	if (!shopId) return /* @__PURE__ */ React.createElement("div", { style: { padding: 16 } }, /* @__PURE__ */ React.createElement(Skeleton, null));
	if (isBooking4 && (!(globalState === null || globalState === void 0 ? void 0 : globalState.bookingId) || (globalState === null || globalState === void 0 ? void 0 : globalState.isParallelResourcesBooking))) return /* @__PURE__ */ React.createElement(Info, props);
	return /* @__PURE__ */ React.createElement(Info$1, props);
};
//#endregion
export { APP as default };
