"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "Carousel", {
    enumerable: true,
    get: function() {
        return Carousel;
    }
});
var _styledcomponents = require("@salutejs/plasma-new-hope/styled-components");
var _react = /*#__PURE__*/ _interop_require_default(require("react"));
var _Carousel = require("./Legacy/Carousel");
var _Carouselconfig = require("./Carousel.config");
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
var mergedConfig = (0, _styledcomponents.mergeConfig)(_styledcomponents.carouselNewConfig, _Carouselconfig.config);
var CarouselNew = (0, _styledcomponents.component)(mergedConfig);
var CarouselComponent = function(props, ref) {
    if (typeof props.index === 'number') {
        return /*#__PURE__*/ _react.default.createElement(_Carousel.CarouselOld, _object_spread({
            ref: ref
        }, props));
    }
    return /*#__PURE__*/ _react.default.createElement(CarouselNew, _object_spread({
        ref: ref
    }, props));
};
var Carousel = (0, _styledcomponents.fixedForwardRef)(CarouselComponent);
