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 _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;
}
import { carouselNewConfig, component, mergeConfig, fixedForwardRef } from '@salutejs/plasma-new-hope/styled-components';
import React from 'react';
import { CarouselOld } from './Legacy/Carousel';
import { config } from './Carousel.config';
var mergedConfig = mergeConfig(carouselNewConfig, config);
var CarouselNew = component(mergedConfig);
var CarouselComponent = function(props, ref) {
    if (typeof props.index === 'number') {
        return /*#__PURE__*/ React.createElement(CarouselOld, _object_spread({
            ref: ref
        }, props));
    }
    return /*#__PURE__*/ React.createElement(CarouselNew, _object_spread({
        ref: ref
    }, props));
};
var Carousel = fixedForwardRef(CarouselComponent);
export { Carousel };
