'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _FormInfo = require('../FormInfo');

var _FormInfo2 = _interopRequireDefault(_FormInfo);

var _FormContent = require('../FormContent');

var _FormContent2 = _interopRequireDefault(_FormContent);

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

/**
 * @category controls
 * @component form
 * @variations collab-ui-react
 **/

var FormSection = function FormSection(props) {
  var title = props.title,
      description = props.description,
      children = props.children;


  return _react2.default.createElement(
    'div',
    { className: 'cui-form__section' },
    _react2.default.createElement(_FormInfo2.default, { title: title, description: description }),
    _react2.default.createElement(
      _FormContent2.default,
      null,
      children
    )
  );
};

FormSection.defaultProps = {
  description: '',
  children: null
};

FormSection.displayName = 'FormSection';

exports.default = FormSection;

/**
* @name Form Section
* @description Forms are useful.
*
* @category controls
* @component form
* @section Form Section
*
* @js

import {
  FormSection,
  Input
} from '@collab-ui/react';

export default function Default() {
    return (
      <div className='row'>
        <br />
        <FormSection
          title='Section Title'
          description={`Section Description. Curabitur lobortis id lorem id bibendum. Ut id consectetur magna. Quisque volutpat augue enim, pulvinar lobortis nibh lacinia at. Vestibulum nec erat ut mi sollicitudin porttitor id sit amet risus. Nam tempus vel odio vitae aliquam. In imperdiet eros id lacus vestibulum vestibulum. Suspendisse fermentum sem sagittis ante venenatis egestas quis vel justo. Maecenas semper suscipit nunc, sed aliquam sapien convallis eu. Nulla ut turpis in diam dapibus consequat.`}
        >
          <Input
            htmlId='testMe2'
            value='testMe2'
            name='testMe2'
            label='First Input'
            disabled
            placeholder='Disabled Input'
            onChange={() => {}}
            inputHelpText='Field Must be Disabled'
            errorArr={[]}
          />
        </FormSection>
      </div>
    );
  }

**/

module.exports = exports['default'];