import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { MobileContext } from "../../gravity-blocks/context/mobileContext/index.js";
import { SliderType } from "../../models/index.js";
import { block } from "../../utils/index.js";
import Header from "../Header/Header.js";
import { default as SliderBlock } from "../Slider/Slider.js";
import './HeaderSlider.css';
const b = block('header-slider-block');
export const HeaderSliderBlock = ({ items, arrows, ...props }) => {
    const isMobile = React.useContext(MobileContext);
    const showArrows = isMobile ? false : arrows;
    return (_jsx("div", { className: b('wrapper'), "data-qa": "header-slider", children: _jsx(SliderBlock, { ...props, arrows: showArrows, slidesToShow: 1, type: SliderType.HeaderCard, animated: false, blockClassName: b(), arrowSize: 20, children: items &&
                items.map((item, index) => (_jsx("div", { className: b('item'), "data-qa": `header-slider-item-${index + 1}`, children: _jsx(Header, { ...item, className: b('item-content') }) }, index))) }) }));
};
export default HeaderSliderBlock;
//# sourceMappingURL=HeaderSlider.js.map
