var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/plus/walletPassGallery/components/passDetail/index.tsx
var passDetail_exports = {};
__export(passDetail_exports, {
  default: () => passDetail_default
});
module.exports = __toCommonJS(passDetail_exports);
var import_react = __toESM(require("react"));
var import_dayjs = __toESM(require("dayjs"));
var import_antd = require("antd");
var import_ahooks = require("ahooks");
var import_classnames = __toESM(require("classnames"));
var import_utils = require("@pisell/utils");
var import_materials = require("@pisell/materials");
var import_utils2 = require("../../../productSelect/utils");
var import_CategoryTabs = __toESM(require("../../../productSelect/CategoryTabs"));
var import_IntersectionObserver = __toESM(require("../../../productSelect/components/IntersectionObserver"));
var import_serve = require("../../serve");
var import_usageRule = __toESM(require("../usageRule"));
var import_timelineSection = __toESM(require("../timelineSection"));
var import_recharge = __toESM(require("../recharge"));
var import_footerButton = __toESM(require("../footerButton"));
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
var import_index = require("./index.less");
var import_utils3 = require("../../../../components/wallet/utils");
var import_locales = __toESM(require("../../locales"));
var import_utils4 = require("../../../../utils");
var import_utils5 = require("../../../../components/booking/utils");
var import_amount = require("../../../../components/booking/components/footer/amount");
var import_utils6 = require("../../../../components/booking/components/footer/utils");
var { Text } = import_antd.Typography;
var PassDetail = (props) => {
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
  const { symbol = "$" } = (0, import_materials.usePisellConfig)();
  const {
    dataSource,
    customer,
    platform = "pc",
    showTimeLine = true,
    onListRefresh
  } = props;
  const [activeKey, setActiveKey] = (0, import_react.useState)("detail");
  const [rechargeOpen, setRechargeOpen] = (0, import_react.useState)(false);
  const containerRef = (0, import_react.useRef)(null);
  const isIndicatorVisibleRef = (0, import_react.useRef)(false);
  const context = (0, import_useEngineContext.default)();
  const {
    store,
    isTerminal,
    interaction,
    isApp,
    isWebPos,
    action,
    getData,
    pisellos,
    pisellosAllModule
  } = (_a = context.appHelper) == null ? void 0 : _a.utils;
  const { apiPrefix } = ((_b = context.appHelper) == null ? void 0 : _b.constants) || { apiPrefix: "/h5" };
  const timezone = ((_g = (_f = (_e = (_d = (_c = store == null ? void 0 : store.getState) == null ? void 0 : _c.call(store)) == null ? void 0 : _d.global) == null ? void 0 : _e.symbol) == null ? void 0 : _f.shop) == null ? void 0 : _g.timezone) || "Asia/Shanghai";
  const isTerminalEnv = (typeof isTerminal === "function" ? isTerminal() : !!isTerminal) || (isApp == null ? void 0 : isApp());
  import_utils.locales.init(import_locales.default, ((_i = (_h = context == null ? void 0 : context.engine) == null ? void 0 : _h.props) == null ? void 0 : _i.locale) || "en");
  if ((_k = (_j = context.appHelper) == null ? void 0 : _j.utils) == null ? void 0 : _k.request) {
    import_utils4.request.setRequest((_m = (_l = context.appHelper) == null ? void 0 : _l.utils) == null ? void 0 : _m.request);
  }
  const {
    id = "",
    code = "",
    tag = "",
    product_title = "",
    encoded = "",
    balance,
    expire_date = "",
    product = {},
    custom_schedule_snapshot,
    customer_id,
    limit_status
  } = dataSource || {};
  const {
    description = "",
    extension_data = [],
    customer_order_behavior_count = 0
  } = product || {};
  const _getDetail = (0, import_ahooks.useRequest)(
    () => (0, import_serve.getDetailApi)({
      id,
      apiPrefix,
      order_behavior_count_customer_id: customer_id
    }),
    {
      ready: !!id,
      refreshDeps: [id, customer_id]
    }
  );
  (0, import_react.useEffect)(() => {
    var _a2, _b2;
    (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.mountFunction) == null ? void 0 : _b2.call(
      _a2,
      "customer",
      "recharge",
      async (strVal) => {
        return onListRefresh == null ? void 0 : onListRefresh();
      }
    );
  }, [id]);
  const scheduleList = (0, import_react.useMemo)(() => {
    return (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [];
  }, [custom_schedule_snapshot]);
  (0, import_react.useEffect)(() => {
    if (tag === "product_discount_card") {
      setActiveKey("detail");
    }
    if (containerRef.current) {
      containerRef.current.scrollTop = 0;
    }
  }, [id, tag]);
  const _anchorOptions = (0, import_react.useMemo)(() => {
    const options = [
      {
        key: "detail",
        label: import_utils.locales.getText("wallet-pass-gallery.detail")
      }
    ];
    if (tag !== "product_discount_card") {
      options.push({
        key: "activityLog",
        label: import_utils.locales.getText("wallet-pass-gallery.activelog")
      });
    }
    return options;
  }, [dataSource == null ? void 0 : dataSource.tag]);
  const debounceIndicator = (0, import_react.useCallback)((delay) => {
    isIndicatorVisibleRef.current = true;
    const timeoutId = setTimeout(() => {
      isIndicatorVisibleRef.current = false;
    }, delay);
    return () => clearTimeout(timeoutId);
  }, []);
  const descs = (0, import_react.useMemo)(() => {
    var _a2, _b2, _c2;
    const detail = (0, import_utils3.formatScheduleText)(
      scheduleList,
      (_b2 = (_a2 = context == null ? void 0 : context.engine) == null ? void 0 : _a2.props) == null ? void 0 : _b2.locale
    );
    let expireText = expire_date ? expire_date : import_utils.locales.getText("wallet-pass-gallery.expireDate");
    if (scheduleList.length > 0) {
      let validityTexts = "";
      let excludedText = "";
      let includedText = "";
      detail.forEach((item) => {
        if (item.validityTexts.length > 0) {
          validityTexts = `${validityTexts}${item.validityTexts.join("\n")}
`;
        }
        if (item.excluded_date.length > 0) {
          excludedText = `${excludedText}${item.excluded_date.join("\n")}
`;
        }
        if (item.included_date.length > 0) {
          includedText = `${includedText}${item.included_date.join("\n")}
`;
        }
      });
      expireText = /* @__PURE__ */ import_react.default.createElement("span", { className: "wallet-detail-expire-text" }, validityTexts, excludedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.notValidDate")), excludedText, includedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.includedDate")), includedText);
    }
    let data = [
      {
        label: import_utils.locales.getText("wallet-pass-gallery.cardName"),
        value: product_title
      },
      {
        label: import_utils.locales.getText("wallet-pass-gallery.carNumber"),
        value: encoded,
        isLink: false
      },
      {
        label: import_utils.locales.getText("wallet-pass-gallery.validDate"),
        value: expireText
      }
    ];
    if (tag === "product_discount_card") {
      const isFixedAmount = ((_c2 = dataSource.metadata) == null ? void 0 : _c2.discount_card_type) === "fixed_amount";
      data.splice(2, 0, {
        label: import_utils.locales.getText("wallet-pass-gallery.discount"),
        value: balance ? isFixedAmount ? `${symbol}${Number(balance)}` : `${Number(balance)}%` : ""
      });
    } else if (tag === "point_card") {
      data.splice(2, 0, {
        label: import_utils.locales.getText("wallet-pass-gallery.points"),
        value: balance ? `${Number(balance)}` : ""
      });
    } else if (tag === "good_pass") {
      data.splice(2, 0, {
        label: import_utils.locales.getText("wallet-pass-gallery.goodPass"),
        value: balance ? `${Number(balance)}` : ""
      });
    } else {
      data.splice(2, 0, {
        label: import_utils.locales.getText("wallet-pass-gallery.balance"),
        value: balance ? `${symbol}${Number(balance)}` : ""
      });
    }
    return data;
  }, [dataSource]);
  const handleItemIntersectionIn = (0, import_react.useCallback)((_key) => {
    if (!isIndicatorVisibleRef.current && _key) {
      setActiveKey(_key);
    }
  }, []);
  const getDataFromHost = (0, import_react.useCallback)(() => {
    try {
      const is_price_include_tax = getData == null ? void 0 : getData("is_price_include_tax");
      const tax_rate = (getData == null ? void 0 : getData("tax_rate")) || "10";
      const tax_title = (getData == null ? void 0 : getData("tax_title")) || "GST";
      const surcharge_list = getData == null ? void 0 : getData("surcharge_list");
      const schedule_list = getData == null ? void 0 : getData("schedule_list");
      const scheduleById = {};
      if (Array.isArray(schedule_list)) {
        for (let item of schedule_list) {
          scheduleById[item.id] = item;
        }
      }
      return {
        is_price_include_tax,
        tax_rate,
        tax_title,
        surcharge_list,
        schedule_list,
        scheduleById
      };
    } catch (error) {
      console.error(error);
      return {};
    }
  }, [getData]);
  const getRechargeClient = (0, import_react.useCallback)(() => {
    const customerId = Number(customer_id || 1);
    const id2 = (customer == null ? void 0 : customer.id) ?? (customer == null ? void 0 : customer.customer_id) ?? (Number.isFinite(customerId) && customerId > 0 ? customerId : 1);
    const displayName = String((customer == null ? void 0 : customer.display_name) || "").trim() || String((customer == null ? void 0 : customer.nickname) || "").trim() || String((customer == null ? void 0 : customer.name) || "").trim() || "";
    return {
      ...customer,
      id: id2,
      display_name: (customer == null ? void 0 : customer.display_name) || (customer == null ? void 0 : customer.name) || "",
      name: displayName,
      email: customer == null ? void 0 : customer.email,
      phone: (customer == null ? void 0 : customer.phone) || (customer == null ? void 0 : customer.mobile),
      country_calling_code: customer == null ? void 0 : customer.country_calling_code
    };
  }, [customer, customer_id]);
  const buildRechargeCacheItem = (0, import_react.useCallback)(
    (params, detail) => {
      var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
      const productDetail = detail || product;
      const productId = (product == null ? void 0 : product.id) || (dataSource == null ? void 0 : dataSource.product_id) || (productDetail == null ? void 0 : productDetail.product_id);
      const productName = (product == null ? void 0 : product.title) || (productDetail == null ? void 0 : productDetail.title) || (productDetail == null ? void 0 : productDetail.name);
      const other = JSON.parse(JSON.stringify(params || {}));
      other.session = params == null ? void 0 : params.session;
      let cacheItem = {
        ...productDetail,
        name: (productDetail == null ? void 0 : productDetail.name) || productName,
        product_id: productId,
        _id: (0, import_utils.getUniqueId)(),
        is_price_include_tax: getData == null ? void 0 : getData("is_price_include_tax"),
        _key: params == null ? void 0 : params.key,
        _extend: {
          start_date: (0, import_dayjs.default)(),
          quantity: (params == null ? void 0 : params.quantity) || 1,
          product_name: productName,
          other,
          isNormalProduct: true,
          note: (_a2 = productDetail == null ? void 0 : productDetail._extend) == null ? void 0 : _a2.note,
          priceOverride: (_b2 = productDetail == null ? void 0 : productDetail._extend) == null ? void 0 : _b2.priceOverride,
          origin_total: (_c2 = productDetail == null ? void 0 : productDetail._extend) == null ? void 0 : _c2.origin_total,
          _skuValue: (_d2 = productDetail == null ? void 0 : productDetail._extend) == null ? void 0 : _d2._skuValue,
          price: (_e2 = productDetail == null ? void 0 : productDetail._extend) == null ? void 0 : _e2.price,
          weighing: (_f2 = productDetail == null ? void 0 : productDetail._extend) == null ? void 0 : _f2.weighing
        },
        new: 1
      };
      cacheItem._extend.price = (0, import_utils5.getMainPrice)(
        cacheItem,
        ((_g2 = productDetail == null ? void 0 : productDetail._extend) == null ? void 0 : _g2.price) ?? (productDetail == null ? void 0 : productDetail.price)
      );
      const total = (0, import_utils5.getProductTotalPrice)(cacheItem);
      cacheItem._extend.total = total;
      if (!((_h2 = cacheItem._extend) == null ? void 0 : _h2.origin_total) && ((_i2 = cacheItem._extend) == null ? void 0 : _i2.origin_total) !== 0) {
        cacheItem._extend.origin_total = total;
      }
      return cacheItem;
    },
    [dataSource == null ? void 0 : dataSource.product_id, getData, product]
  );
  const buildPaymentModalData = (0, import_react.useCallback)(
    (params, detail) => {
      var _a2, _b2;
      const rechargeProduct = buildRechargeCacheItem(params, detail);
      const client = getRechargeClient();
      const rechargeState = {
        bookingId: 0,
        bookingDetail: null,
        renderType: "booking",
        isBookingTicket2: true,
        businessCode: "",
        shop_discount: "",
        client: {
          value: client
        },
        date: {
          value: (0, import_dayjs.default)()
        },
        service: {
          value: [rechargeProduct]
        },
        addons: {
          value: []
        },
        pet: {
          value: {}
        },
        contacts: {
          value: []
        },
        contacts_info: {
          value: null
        },
        notes: {
          orderNote: ""
        },
        paymentPaid: {
          value: {}
        }
      };
      const ScheduleModule = (pisellosAllModule == null ? void 0 : pisellosAllModule.ScheduleModule) || ((_a2 = pisellos == null ? void 0 : pisellos.getModule) == null ? void 0 : _a2.call(pisellos, "schedule")) || ((_b2 = pisellos == null ? void 0 : pisellos.getModule) == null ? void 0 : _b2.call(pisellos, "appointmentBooking_schedule"));
      const total = (0, import_amount.getSumTotal)(rechargeState, {
        isEdit: true,
        ScheduleModule,
        ...getDataFromHost()
      });
      const order_info = (0, import_utils6.formatValues)(rechargeState);
      const orderTotalList = [
        {
          hidden: true,
          key: "custom_orderPaidAmount",
          value: total.orderPaidAmount,
          label: import_utils.locales.getText("pisell2.text.amount-paid-on-order")
        },
        {
          hidden: true,
          key: "custom_paySurchargeFee",
          value: total.paySurchargeFee,
          label: import_utils.locales.getText("pisell1.text.payment-fee")
        },
        {
          hidden: true,
          key: "custom_actualPaidAmount",
          value: total.actualPaidAmount,
          label: import_utils.locales.getText(
            "pisell2.text.amount-actually-paid-by-the-customer"
          )
        },
        {
          hidden: true,
          key: "custom_totalRefundAmount",
          value: total.totalRefundAmount,
          label: import_utils.locales.getText("pisell2.text.refunded-amount")
        }
      ];
      const subTotalList = [
        {
          key: "sub_total",
          value: total.productAmount
        },
        ...total.surcharge || [],
        {
          key: "tax",
          value: total.tax,
          tax: total.taxInfo
        },
        {
          key: "discount",
          value: total.shopDiscount
        },
        {
          key: "expect_amount",
          value: total.expectAmount,
          label: import_utils.locales.getText("pisell2.subtotal.total")
        },
        {
          hidden: !total.roundingAmount,
          key: "custom_roundingAmount",
          value: total.roundingAmount,
          label: import_utils.locales.getText("pisell1.text.rounding")
        }
      ];
      return {
        paymentModalData: {
          order_info,
          subtotal_info: {
            subTotalList,
            orderTotalList,
            total,
            showDetail: false
          },
          existPayment: []
        },
        client,
        total
      };
    },
    [
      buildRechargeCacheItem,
      getDataFromHost,
      getRechargeClient,
      pisellos,
      pisellosAllModule == null ? void 0 : pisellosAllModule.ScheduleModule
    ]
  );
  const handleRechargeClick = (0, import_react.useCallback)(() => {
    var _a2, _b2;
    if (isWebPos) {
      const productId = (product == null ? void 0 : product.id) || (dataSource == null ? void 0 : dataSource.product_id);
      action == null ? void 0 : action({
        type: "pisell1.handleOpenNormalProductModal",
        data: {
          product_id: productId,
          productData: product,
          mode: "create"
        },
        callback: (params, _extensionType, detail) => {
          const skuParams = (params == null ? void 0 : params.data) || params;
          const productDetail = (params == null ? void 0 : params.detail) || detail;
          console.log("params", skuParams, productDetail);
          const { paymentModalData, client, total } = buildPaymentModalData(
            skuParams,
            productDetail
          );
          console.log("paymentModalData", paymentModalData, client, total);
          action == null ? void 0 : action({
            type: "pisell1.handleOpenPayment",
            data: {
              paymentModalData,
              client,
              shopDiscount: total.shopDiscount,
              currentTotalPrice: total.productAmount,
              paymentResultDisplayMode: "toast",
              config: {
                showHeaderCenter: true,
                showHeaderRightButton: false,
                disabledSwitchClient: true
              }
            },
            callback: (res) => {
              var _a3;
              if ((_a3 = res == null ? void 0 : res.data) == null ? void 0 : _a3.isCallbackFromToast) return;
              onListRefresh == null ? void 0 : onListRefresh();
            }
          });
        }
      });
      return;
    }
    if (isTerminalEnv) {
      const productId = (product == null ? void 0 : product.id) || (dataSource == null ? void 0 : dataSource.product_id) || "";
      (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
        module: "customer",
        key: "recharge",
        data: {
          product_id: String(productId || ""),
          card_id: String(id || ""),
          card_code: String(code || ""),
          customer_id: String(customer_id || "")
        }
      });
      return;
    }
    setRechargeOpen(true);
  }, [
    action,
    buildPaymentModalData,
    isWebPos,
    isTerminalEnv,
    id,
    code,
    customer_id,
    product,
    dataSource,
    interaction,
    onListRefresh
  ]);
  if (!dataSource) {
    return /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, null);
  }
  const _switchCategory = (key) => {
    setActiveKey(key);
    debounceIndicator(300);
    const categoryIndex = _anchorOptions.findIndex((item) => item.key === key);
    const _scrollParent = containerRef.current;
    if (!_scrollParent) return;
    const target = document.querySelector(
      `[data-anchor="${key}"]`
    );
    if (!target) return;
    const detailWrapper = document.querySelector(
      `.pisell-wallet-pass-gallery_detail-content`
    );
    const tabsWrapper = document.querySelector(
      `.pisell-wallet-pass-gallery-tabs-wrapper`
    );
    const tabsHeight = (tabsWrapper == null ? void 0 : tabsWrapper.offsetHeight) || 0;
    if (categoryIndex === 0) {
      if (detailWrapper) {
        const wrapperOffsetTop = (0, import_utils2.getOffsetTopRelativeToScrollContainer)(
          detailWrapper,
          _scrollParent
        );
        _scrollParent.scrollTop = wrapperOffsetTop;
      }
      return;
    } else {
      const listOffsetTop = (0, import_utils2.getOffsetTopRelativeToScrollContainer)(
        target,
        _scrollParent
      );
      _scrollParent.scrollTop = listOffsetTop - tabsHeight;
    }
  };
  const renderTimeLine = () => {
    if (tag === "product_discount_card") return null;
    if (!showTimeLine) return null;
    return /* @__PURE__ */ import_react.default.createElement(
      import_timelineSection.default,
      {
        code,
        tag,
        timezone,
        apiPrefix,
        isTerminalEnv,
        interaction,
        balance,
        expireDate: expire_date
      }
    );
  };
  if (!props.dataSource) return null;
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
    "div",
    {
      className: (0, import_classnames.default)(
        `pisell-wallet-pass-gallery_detail`,
        `pisell-wallet-pass-gallery_detail-${platform}`,
        {
          [`pisell-wallet-pass-gallery_detail-with-footer`]: platform === "h5" && tag === "gift_card"
        }
      )
    },
    /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        className: "pisell-wallet-pass-gallery_detail-content",
        ref: containerRef
      },
      _anchorOptions.length > 1 && /* @__PURE__ */ import_react.default.createElement(
        import_CategoryTabs.default,
        {
          key: id,
          className: "pisell-wallet-pass-gallery-tabs-wrapper",
          activeKey,
          items: _anchorOptions,
          onChange: _switchCategory,
          loading: false,
          style: { padding: 0 }
        }
      ),
      /* @__PURE__ */ import_react.default.createElement(
        import_IntersectionObserver.default,
        {
          rootMargin: "-70px 0px -270px 0px",
          priorityMode: "top"
        },
        /* @__PURE__ */ import_react.default.createElement(
          import_IntersectionObserver.IntersectionTrigger,
          {
            style: { height: "1px" },
            onShow: () => handleItemIntersectionIn("detail")
          },
          /* @__PURE__ */ import_react.default.createElement("div", { "data-anchor": "detail" })
        ),
        /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(Text, { className: "pisell-wallet-pass-gallery_detail-title" }, import_utils.locales.getText("wallet-pass-gallery.details")), platform === "pc" && tag === "gift_card" && limit_status !== "disable" && ((_n = dataSource == null ? void 0 : dataSource.machinecode_config) == null ? void 0 : _n.hide_recharge) === 0 && /* @__PURE__ */ import_react.default.createElement(
          import_antd.Button,
          {
            type: "primary",
            size: "large",
            onClick: handleRechargeClick
          },
          import_utils.locales.getText("wallet-pass-gallery.recharge")
        ), /* @__PURE__ */ import_react.default.createElement(
          import_materials.PisellStatisticList,
          {
            data: descs,
            labelColor: "#667085",
            valueColor: "#101828",
            backgroundColors: ["#fff"],
            isHasBorder: false
          }
        ), description && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-pass-gallery_detail-card-content-tip" }, /* @__PURE__ */ import_react.default.createElement("div", { dangerouslySetInnerHTML: { __html: description } })), /* @__PURE__ */ import_react.default.createElement(import_usageRule.default, { dataSource: _getDetail.data })),
        /* @__PURE__ */ import_react.default.createElement(
          import_IntersectionObserver.IntersectionTrigger,
          {
            style: { height: "1px" },
            onShow: () => handleItemIntersectionIn("activityLog")
          },
          /* @__PURE__ */ import_react.default.createElement("div", { "data-anchor": "activityLog" })
        ),
        /* @__PURE__ */ import_react.default.createElement("div", null, renderTimeLine())
      )
    )
  ), platform === "h5" && tag === "gift_card" ? /* @__PURE__ */ import_react.default.createElement(
    import_footerButton.default,
    {
      appleWalletUrl: (_o = _getDetail.data) == null ? void 0 : _o.apple_wallet_url,
      googleWalletUrl: (_p = _getDetail.data) == null ? void 0 : _p.google_wallet_url,
      onRechargeClick: ((_q = dataSource == null ? void 0 : dataSource.machinecode_config) == null ? void 0 : _q.hide_recharge) === 0 ? handleRechargeClick : void 0,
      platform
    }
  ) : null, /* @__PURE__ */ import_react.default.createElement(
    import_recharge.default,
    {
      platform,
      detailData: _getDetail.data,
      open: rechargeOpen,
      onClose: () => setRechargeOpen(false)
    }
  ));
};
var passDetail_default = PassDetail;
