"use strict";

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

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

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

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

var _CarouselItems = require("./CarouselItems");

var Carousel = function Carousel(props) {
  var withArrows = props.withArrows,
      small = props.small,
      query = props.query,
      withScrollBar = props.withScrollBar;

  var _useReleva = (0, _lib.useReleva)(),
      recommenders = _useReleva.recommenders,
      pixelData = _useReleva.pixelData;

  (0, _lib.usePixelProductsImpression)({
    productsData: pixelData,
    isCarousel: true
  });
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, recommenders == null ? void 0 : recommenders.map(function (tab, i) {
    return /*#__PURE__*/_react["default"].createElement(_CarouselItems.CarouselItems, {
      key: "__" + (tab == null ? void 0 : tab.name) + "__CAROUSEL__" + i,
      query: query,
      header: tab == null ? void 0 : tab.name,
      withArrows: withArrows,
      withScrollBar: withScrollBar,
      small: small,
      skus: tab == null ? void 0 : tab.skus
    });
  }));
};

exports.Carousel = Carousel;
//# sourceMappingURL=carousel.component.js.map