"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get CarouselItem () {
        return CarouselItem;
    },
    get CarouselItemVirtual () {
        return CarouselItemVirtual;
    }
});
var _react = /*#__PURE__*/ _interop_require_default(require("react"));
var _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
var _mixins = require("../../mixins");
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;
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys, key, i;
    if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
        sourceKeys = Reflect.ownKeys(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
        return target;
    }
    target = _object_without_properties_loose(source, excluded);
    if (Object.getOwnPropertySymbols) {
        sourceKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
        target[key] = source[key];
    }
    return target;
}
var StyledItem = _styledcomponents.default.div.withConfig({
    displayName: "CarouselItem__StyledItem",
    componentId: "sc-36578ca1-0"
})([
    "",
    ""
], _mixins.applyScrollSnap);
var StyledItemVirtual = _styledcomponents.default.div.withConfig({
    displayName: "CarouselItem__StyledItemVirtual",
    componentId: "sc-36578ca1-1"
})([
    "position:absolute;"
]);
var CarouselItem = function CarouselItem(_0) {
    var _0_scrollSnapAlign = _0.scrollSnapAlign, scrollSnapAlign = _0_scrollSnapAlign === void 0 ? 'center' : _0_scrollSnapAlign, _0_scrollSnapStop = _0.scrollSnapStop, scrollSnapStop = _0_scrollSnapStop === void 0 ? 'always' : _0_scrollSnapStop, children = _0.children, rest = _object_without_properties(_0, [
        "scrollSnapAlign",
        "scrollSnapStop",
        "children"
    ]);
    return /*#__PURE__*/ _react.default.createElement(StyledItem, _object_spread({
        scrollSnapAlign: scrollSnapAlign,
        scrollSnapStop: scrollSnapStop,
        role: "group",
        "aria-roledescription": "slide"
    }, rest), children);
};
var CarouselItemVirtual = function CarouselItemVirtual(_0) {
    var left = _0.left, top = _0.top, children = _0.children, style = _0.style, rest = _object_without_properties(_0, [
        "left",
        "top",
        "children",
        "style"
    ]);
    return /*#__PURE__*/ _react.default.createElement(StyledItemVirtual, _object_spread({
        role: "group",
        "aria-roledescription": "slide",
        style: _object_spread({
            transform: "translate(".concat(left !== null && left !== void 0 ? left : 0, "px, ").concat(top !== null && top !== void 0 ? top : 0, "px)")
        }, style)
    }, rest), children);
};
