Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

const tslib_1 = require("tslib");

const react_1 = tslib_1.__importDefault(require("react"));

const Empty_1 = require("../../../atoms/Empty");

const words_1 = require("../../../../words");

const styled_1 = require("../CheckoutCartBundle/ProductItem/styled");

const styled_2 = require("./styled");

function defaultRenderCartButton() {
  return react_1.default.createElement(Empty_1.Empty, null);
}

exports.defaultRenderCartButton = defaultRenderCartButton;

function defaultRenderCartProduct(props) {
  const {
    item,
    index,
    productCount
  } = props;
  const {
    image,
    brandName,
    name,
    options,
    salePrice,
    regPrice,
    isBundleSubProduct,
    hasAddon,
    navigationUrl
  } = item;
  const captionBgColor = isBundleSubProduct && hasAddon ? '#EA7B0A' : '#195FBF';
  const bundleCaption = `${words_1.wording.item} ${index + 1} of ${productCount}`;
  const caption = isBundleSubProduct && hasAddon ? words_1.wording.addon : bundleCaption;
  return react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement(styled_2.StyledImageLink, {
    to: navigationUrl,
    target: "_top"
  }, react_1.default.createElement(styled_1.StyledImageWithCaption, {
    src: image.value,
    caption: caption,
    captionColor: captionBgColor
  })), react_1.default.createElement(styled_2.ProductDetails, null, react_1.default.createElement(styled_2.BrandName, {
    breedType: "h4",
    content: brandName
  }), react_1.default.createElement(styled_2.StyledLink, {
    to: navigationUrl,
    target: "_top"
  }, react_1.default.createElement(styled_2.ProductName, {
    breedType: "h4",
    content: name
  })), react_1.default.createElement(styled_2.ProductOptions, {
    list: options
  }), react_1.default.createElement(styled_2.ItemPrice, {
    salePrice: salePrice,
    regularPrice: regPrice
  })));
}

exports.defaultRenderCartProduct = defaultRenderCartProduct; //# sourceMappingURL=renderProps.js.map