var babelHelpers = require('./babel-helpers.js');
/**
 * MUI React container module
 * @module react/container
 */

'use strict';

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

var _react = require('react');

var _react2 = babelHelpers.interopRequireDefault(_react);

/**
 * Container constructor
 * @class
 */
var Container = function (_React$Component) {
  babelHelpers.inherits(Container, _React$Component);

  function Container() {
    babelHelpers.classCallCheck(this, Container);
    return babelHelpers.possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));
  }

  babelHelpers.createClass(Container, [{
    key: 'render',
    value: function render() {
      var _props = this.props,
          children = _props.children,
          className = _props.className,
          fluid = _props.fluid,
          reactProps = babelHelpers.objectWithoutProperties(_props, ['children', 'className', 'fluid']);


      var cls = 'mui-container';

      // fluid containers
      if (fluid) cls += '-fluid';

      return _react2.default.createElement(
        'div',
        babelHelpers.extends({}, reactProps, {
          className: cls + ' ' + className
        }),
        children
      );
    }
  }]);
  return Container;
}(_react2.default.Component);

/** Define module API */


Container.propTypes = {
  fluid: _react2.default.PropTypes.bool
};
Container.defaultProps = {
  className: '',
  fluid: false
};
exports.default = Container;
module.exports = exports['default'];