'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports["default"] = undefined;

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _objectAssign = require('object-assign');

var _objectAssign2 = _interopRequireDefault(_objectAssign);

var _reactSlick = require('react-slick');

var _reactSlick2 = _interopRequireDefault(_reactSlick);

var _react = require('react');

var React = _interopRequireWildcard(_react);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

if (typeof window !== 'undefined') {
    var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
        return {
            media: mediaQuery,
            matches: false,
            addListener: function addListener() {},
            removeListener: function removeListener() {}
        };
    };
    window.matchMedia = window.matchMedia || matchMediaPolyfill;
}

var Carousel = function (_React$Component) {
    (0, _inherits3["default"])(Carousel, _React$Component);

    function Carousel() {
        (0, _classCallCheck3["default"])(this, Carousel);
        return (0, _possibleConstructorReturn3["default"])(this, _React$Component.apply(this, arguments));
    }

    Carousel.prototype.render = function render() {
        var props = (0, _objectAssign2["default"])({}, this.props);
        if (props.effect === 'fade') {
            props.fade = true;
            props.draggable = false;
        }
        var className = 'ant-carousel';
        if (props.vertical) {
            className = className + ' ant-carousel-vertical';
        }
        return React.createElement(
            'div',
            { className: className },
            React.createElement(_reactSlick2["default"], props)
        );
    };

    return Carousel;
}(React.Component);

exports["default"] = Carousel;

Carousel.defaultProps = {
    dots: true,
    arrows: false
};
module.exports = exports['default'];