'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactAddonsCssTransitionGroup = require('react-addons-css-transition-group');

var _reactAddonsCssTransitionGroup2 = _interopRequireDefault(_reactAddonsCssTransitionGroup);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _Drawer = require('./Drawer.scss');

var _Drawer2 = _interopRequireDefault(_Drawer);

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

function DrawerAnimation(_ref) {
	var children = _ref.children;

	return _react2.default.createElement(
		_reactAddonsCssTransitionGroup2.default,
		{
			transitionName: 'tc-drawer',
			transitionAppearTimeout: 230,
			transitionEnterTimeout: 230,
			transitionLeaveTimeout: 230
		},
		children
	);
}

DrawerAnimation.propTypes = {
	children: _react.PropTypes.node
};

function Drawer(_ref2) {
	var className = _ref2.className,
	    style = _ref2.style,
	    children = _ref2.children;

	var drawerClasses = (0, _classnames2.default)(_Drawer2.default.drawer, className, 'tc-drawer');
	return _react2.default.createElement(
		'div',
		{ className: drawerClasses, style: style },
		children
	);
}

Drawer.Animation = DrawerAnimation;

Drawer.propTypes = {
	children: _react.PropTypes.node,
	style: _react.PropTypes.object, // eslint-disable-line react/forbid-prop-types
	className: _react.PropTypes.string
};

exports.default = Drawer;