'use strict';

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

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

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

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

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

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

var _inherits3 = _interopRequireDefault(_inherits2);

var _dec, _class, _class2, _temp;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _lib = require('@instructure/ui-themeable/lib');

var _lib2 = _interopRequireDefault(_lib);

var _theme = require('./theme');

var _theme2 = _interopRequireDefault(_theme);

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

var styles = {
  template: function template(theme) {
    return '/*  imported from styles.css  */\n\n.Caption__styles__content {\n  margin: ' + theme.contentMargin + ';\n}\n\n.Caption__styles__heading {\n  border-bottom: ' + theme.headingBorderWidth + ' solid ' + theme.headingBorderColor + ';\n  padding-bottom: ' + theme.headingPadding + ';\n}\n\n.Caption__styles__children {\n  padding-top: ' + theme.childrenPadding + ';\n}\n';
  },
  'content': 'Caption__styles__content',
  'heading': 'Caption__styles__heading',
  'children': 'Caption__styles__children'
};
var Caption = (_dec = (0, _lib2.default)(_theme2.default, styles), _dec(_class = (_temp = _class2 = function (_Component) {
  (0, _inherits3.default)(Caption, _Component);

  function Caption() {
    (0, _classCallCheck3.default)(this, Caption);
    return (0, _possibleConstructorReturn3.default)(this, (Caption.__proto__ || Object.getPrototypeOf(Caption)).apply(this, arguments));
  }

  (0, _createClass3.default)(Caption, [{
    key: 'render',
    value: function render() {
      return _react2.default.createElement(
        'div',
        { className: styles.content },
        _react2.default.createElement(
          'div',
          { className: styles.heading },
          this.props.text
        ),
        _react2.default.createElement(
          'div',
          { className: styles.children },
          this.props.children
        )
      );
    }
  }]);
  Caption.displayName = 'Caption'
  ;
  return Caption;
}(_react.Component), _class2.propTypes = {
  text: _propTypes2.default.string,
  children: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.arrayOf(_propTypes2.default.object)])
}, _temp)) || _class);
exports.default = Caption;