import { __assign } from "tslib";
// @ts-nocheck
import './ContentSlider.css';
import React from 'react';
import { cn } from '../../utils/bem';
import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
import { Picture } from '../Picture/Picture';
import { Slider, SliderItem } from '../Slider/Slider';
import { Typography } from '../Typography';
var cnContentSlider = cn('ContentSlider');
export var ContentSlider = forwardRefWithAs(function (props) {
    var items = props.items, text = props.text, className = props.className;
    var config = {
        pagination: {
            clickable: true
        },
        navigation: true
    };
    return (React.createElement("div", { className: cnContentSlider({}, [className]) },
        React.createElement(Slider, __assign({}, config), items.map(function (item, index) { return (React.createElement(SliderItem, { key: index },
            React.createElement(Picture, __assign({}, item)))); })),
        text && (React.createElement("div", { className: cnContentSlider('Text') },
            React.createElement(Typography.Text, { view: "web", parse: true, size: "s" }, text)))));
});
