import React from 'react';
import { StandardBigSaleTemplate } from "./Standard";
import { SecondaryScreenBigSaleTemplate } from "./SecondaryScreen";

/**
 * BigSale 模板渲染器：Base 负责外层容器与数据组装，模板只负责区域组合。
 */
export function BigSaleTemplateRenderer(_ref) {
  var _ref$tmpl = _ref.tmpl,
    tmpl = _ref$tmpl === void 0 ? 'standard' : _ref$tmpl,
    _ref$isActive = _ref.isActive,
    isActive = _ref$isActive === void 0 ? true : _ref$isActive,
    context = _ref.context,
    mode = _ref.mode,
    variant = _ref.variant,
    productLoadParams = _ref.productLoadParams,
    productDisplayConfig = _ref.productDisplayConfig,
    productCatalogSessionKey = _ref.productCatalogSessionKey,
    saleDetailTemplate = _ref.saleDetailTemplate,
    saleDetailModuleConfig = _ref.saleDetailModuleConfig,
    orderId = _ref.orderId,
    locale = _ref.locale,
    saleDetailWrapperProps = _ref.saleDetailWrapperProps,
    saleDetailHeaderSlot = _ref.saleDetailHeaderSlot,
    onOrderComplete = _ref.onOrderComplete;
  switch (tmpl) {
    case 'secondaryScreen':
      return /*#__PURE__*/React.createElement(SecondaryScreenBigSaleTemplate, {
        context: context,
        mode: mode,
        variant: variant,
        productLoadParams: productLoadParams,
        productDisplayConfig: productDisplayConfig,
        productCatalogSessionKey: productCatalogSessionKey,
        saleDetailTemplate: saleDetailTemplate,
        saleDetailModuleConfig: saleDetailModuleConfig,
        orderId: orderId,
        locale: locale,
        saleDetailWrapperProps: saleDetailWrapperProps,
        saleDetailHeaderSlot: saleDetailHeaderSlot,
        onOrderComplete: onOrderComplete
      });
    case 'standard':
    default:
      return /*#__PURE__*/React.createElement(StandardBigSaleTemplate, {
        isActive: isActive,
        context: context,
        mode: mode,
        variant: variant,
        productLoadParams: productLoadParams,
        productDisplayConfig: productDisplayConfig,
        productCatalogSessionKey: productCatalogSessionKey,
        saleDetailTemplate: saleDetailTemplate,
        saleDetailModuleConfig: saleDetailModuleConfig,
        orderId: orderId,
        locale: locale,
        saleDetailWrapperProps: saleDetailWrapperProps,
        saleDetailHeaderSlot: saleDetailHeaderSlot,
        onOrderComplete: onOrderComplete
      });
  }
}
export { StandardBigSaleTemplate };
export { SecondaryScreenBigSaleTemplate };