"use strict";
/* eslint-disable no-unused-vars */
/* eslint-disable react/react-in-jsx-scope */
// @ts-nocheck
exports.__esModule = true;
exports.renderFraction = exports.SliderItem = exports.Slider = void 0;
var tslib_1 = require("tslib");
require("swiper/swiper.min.css");
require("swiper/components/navigation/navigation.min.css");
require("swiper/components/pagination/pagination.min.css");
require("./Slider.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var swiper_1 = (0, tslib_1.__importStar)(require("swiper"));
var react_2 = require("swiper/react");
var bem_1 = require("../../utils/bem");
swiper_1["default"].use([swiper_1.Navigation, swiper_1.Pagination, swiper_1.Autoplay, swiper_1.Lazy, swiper_1.EffectFade]);
var cnSlider = (0, bem_1.cn)('Slider');
var Slider = function (_a) {
    var children = _a.children, className = _a.className, _b = _a.centerNavigationOnMobile, centerNavigationOnMobile = _b === void 0 ? true : _b, type = _a.type, otherProps = (0, tslib_1.__rest)(_a, ["children", "className", "centerNavigationOnMobile", "type"]);
    return (react_1["default"].createElement(react_2.Swiper, (0, tslib_1.__assign)({}, otherProps, { className: cnSlider({
            'centered-navigation-mobile': centerNavigationOnMobile,
            type: type
        }, [className]) }), children));
};
exports.Slider = Slider;
exports.SliderItem = react_2.SwiperSlide;
var renderFraction = function (currentClass, totalClass, index, total) {
    return "<span class=".concat(currentClass, ">").concat(index, "</span> <span class=\"delimiter\"></span> <span class=").concat(totalClass, ">").concat(total, "</span>");
};
exports.renderFraction = renderFraction;
