import React from 'react';
import Footer from "../../../AmountFooter";
import Note from "../../../Note";
import useEngineContext from "../../../../../../hooks/useEngineContext";
import { _formatAmount } from "../../utils";
import Options from "../options";
var prefix = 'pisell-lowcode-';
export var renderBundles = function renderBundles(item, hidePrice, isShowPackageNote) {
  var _context$appHelper;
  var translation = function translation(text) {
    return '';
  };
  var context = useEngineContext();
  var utils = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
  translation = (utils === null || utils === void 0 ? void 0 : utils.translationOriginal) || (utils === null || utils === void 0 ? void 0 : utils.translation);
  var title = item.title,
    name = item.name,
    id = item.id,
    price = item.price,
    symbol = item.symbol,
    options = item.options,
    option = item.option;
  return /*#__PURE__*/React.createElement("div", {
    key: id,
    className: "".concat(prefix, "packages-product-bundle-item")
  }, /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefix, "packages-product-bundle-info")
  }, /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefix, "packages-product-bundle-info-title")
  }, translation(title || name)), !hidePrice ? /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefix, "packages-product-bundle-info-num")
  }, _formatAmount(price, symbol)) : null), /*#__PURE__*/React.createElement(Options, {
    options: options || option,
    amountSymbol: symbol
  }), /*#__PURE__*/React.createElement(Footer, {
    item: item
  }), isShowPackageNote ? /*#__PURE__*/React.createElement(Note, {
    item: item,
    type: "inside"
  }) : null);
};