'use strict';

exports.__esModule = true;

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

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

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

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

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

var _inherits3 = _interopRequireDefault(_inherits2);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

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

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

var Form = function (_React$PureComponent) {
  (0, _inherits3.default)(Form, _React$PureComponent);

  function Form() {
    (0, _classCallCheck3.default)(this, Form);
    return (0, _possibleConstructorReturn3.default)(this, _React$PureComponent.apply(this, arguments));
  }

  Form.prototype.render = function render() {
    var _props = this.props,
        name = _props.name,
        children = _props.children;


    return _react2.default.createElement(
      'form',
      { name: name, className: 'cui-form' },
      children
    );
  };

  return Form;
}(_react2.default.PureComponent);

Form.displayName = 'Form';
exports.default = Form;


Form.defaultProps = {
  children: null
};

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

import {
  FormSection,
  FormSubSection,
  RadioGroup,
  Radio,
  Input,
  InputHelper,
  Button
} from '@collab-ui/react';

export default function Default() {
    return (
      <div className='row'>
        <br />
        <Form name='offForm'>
          <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.`}
          >
            <FormSubSection
              label='Subsection Label'
              description='Subsection Description lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse sit amet hendrerit turpis, in accumsan quam.'
            >
              <RadioGroup name='radioGroup2'>
                <Radio
                  value='me2'
                  label='me'
                  htmlId='testRadio1.1'
                  onChange={()=>{}}
                />
                <Radio
                  value='you2'
                  label='you'
                  htmlId='testRadio2.1'
                  onChange={()=>{}}
                />
                <Radio
                  value='us2'
                  label='us'
                  htmlId='testRadio3.1'
                  onChange={()=>{}}
                >
                  <InputHelper message={'I\'m here to help'} />
                </Radio>
              </RadioGroup>
              <Input
                htmlId='testMe2'
                value='testMe2'
                name='testMe2'
                label='First Input'
                disabled
                placeholder='Disabled Input'
                onChange={() => {}}
                inputHelpText='Field Must be Disabled'
                errorArr={[]}
              />
            </FormSubSection>
            <FormSubSection
              label='Subsection Label'
              description='Another One.'
            >
              <Button
                ariaLabel='Click to Do Nothing'
                className='btn--primary'
                onClick={() => {}}
              >
                Click to Do Nothing
              </Button>
            </FormSubSection>
          </FormSection>
        </Form>
      </div>
    );
  }

**/

module.exports = exports['default'];