"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HeaderSliderBlock = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const React = tslib_1.__importStar(require("react"));
const mobileContext_1 = require("../../gravity-blocks/context/mobileContext/index.js");
const models_1 = require("../../models/index.js");
const utils_1 = require("../../utils/index.js");
const Header_1 = tslib_1.__importDefault(require("../Header/Header.js"));
const Slider_1 = tslib_1.__importDefault(require("../Slider/Slider.js"));
const b = (0, utils_1.block)('header-slider-block');
const HeaderSliderBlock = ({ items, arrows, ...props }) => {
    const isMobile = React.useContext(mobileContext_1.MobileContext);
    const showArrows = isMobile ? false : arrows;
    return ((0, jsx_runtime_1.jsx)("div", { className: b('wrapper'), "data-qa": "header-slider", children: (0, jsx_runtime_1.jsx)(Slider_1.default, { ...props, arrows: showArrows, slidesToShow: 1, type: models_1.SliderType.HeaderCard, animated: false, blockClassName: b(), arrowSize: 20, children: items &&
                items.map((item, index) => ((0, jsx_runtime_1.jsx)("div", { className: b('item'), "data-qa": `header-slider-item-${index + 1}`, children: (0, jsx_runtime_1.jsx)(Header_1.default, { ...item, className: b('item-content') }) }, index))) }) }));
};
exports.HeaderSliderBlock = HeaderSliderBlock;
exports.default = exports.HeaderSliderBlock;
//# sourceMappingURL=HeaderSlider.js.map
