"use strict";
exports.__esModule = true;
exports.ContentSlider = void 0;
var tslib_1 = require("tslib");
// @ts-nocheck
require("./ContentSlider.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var bem_1 = require("../../utils/bem");
var PropsWithAsAttributes_1 = require("../../utils/types/PropsWithAsAttributes");
var Picture_1 = require("../Picture/Picture");
var Slider_1 = require("../Slider/Slider");
var Typography_1 = require("../Typography");
var cnContentSlider = (0, bem_1.cn)('ContentSlider');
exports.ContentSlider = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props) {
    var items = props.items, text = props.text, className = props.className;
    var config = {
        pagination: {
            clickable: true
        },
        navigation: true
    };
    return (react_1["default"].createElement("div", { className: cnContentSlider({}, [className]) },
        react_1["default"].createElement(Slider_1.Slider, (0, tslib_1.__assign)({}, config), items.map(function (item, index) { return (react_1["default"].createElement(Slider_1.SliderItem, { key: index },
            react_1["default"].createElement(Picture_1.Picture, (0, tslib_1.__assign)({}, item)))); })),
        text && (react_1["default"].createElement("div", { className: cnContentSlider('Text') },
            react_1["default"].createElement(Typography_1.Typography.Text, { view: "web", parse: true, size: "s" }, text)))));
});
