"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.BannerCarousel = void 0;

var _react = _interopRequireDefault(require("react"));

var _lib = require("@sentecacommerce-theme/lib");

var _Common = require("../Common");

var _banner = require("./Components/Banner/banner.component");

var _HTML = require("./Components/HTML");

var BannerCarousel = function BannerCarousel(props) {
  var banners = props.banners,
      withDots = props.withDots,
      withArrows = props.withArrows,
      isFullWidth = props.isFullWidth;

  var _useReleva = (0, _lib.useReleva)(),
      relevaBanners = _useReleva.banners;

  return /*#__PURE__*/_react["default"].createElement(_Common.CarouselComponent, {
    slides: banners.concat(relevaBanners),
    withDots: withDots,
    withArrows: withArrows,
    isBanner: true,
    isFullWidth: isFullWidth,
    renderSlide: function renderSlide(banner) {
      if (banner != null && banner.html) return /*#__PURE__*/_react["default"].createElement(_HTML.HTML, {
        html: banner.html
      });
      return /*#__PURE__*/_react["default"].createElement(_banner.Banner, banner);
    }
  });
};

exports.BannerCarousel = BannerCarousel;
//# sourceMappingURL=bannerCarousel.component.js.map