'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _NoteContainer = require('./styles/NoteContainer');

var _NoteContainer2 = _interopRequireDefault(_NoteContainer);

var _NoteCorner = require('./styles/NoteCorner');

var _NoteCorner2 = _interopRequireDefault(_NoteCorner);

var _recompose = require('recompose');

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

var Note = function Note(_ref) {
  var children = _ref.children,
      Container = _ref.Container,
      Corner = _ref.Corner;
  return _react2.default.createElement(
    Container,
    null,
    children,
    _react2.default.createElement(Corner, null)
  );
};

Note.propTypes = {
  /**
   * Contents of the note
   */
  children: _propTypes2.default.node.isRequired,
  /**
   * Override the component that renders the outer container
   */
  Container: _propTypes2.default.func,
  /**
   * Override the component that renders the corner
   */
  Corner: _propTypes2.default.func
};

Note.defaultProps = {
  Container: _NoteContainer2.default,
  Corner: _NoteCorner2.default
};

Note.Alternate = (0, _recompose.defaultProps)({
  Container: _NoteContainer2.default.Alternate
})(Note);

exports.default = Note;