'use strict';

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

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _FormColumn = require('./FormColumn');

var _FormColumn2 = _interopRequireDefault(_FormColumn);

var _FormBox = require('./FormBox');

var _FormBox2 = _interopRequireDefault(_FormBox);

var _themeGet = require('../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

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

var Form = _styledComponents2.default.form.withConfig({ displayName: 'Form' }).withConfig({
  displayName: 'Form'
})(['background:transparent;color:inherit;display:flex;flex-direction:row;& > *{flex:1;}&:invalid button[type=\'submit\']{background:', ';color:', ';border-color:', ';cursor:default;box-shadow:none;}&:invalid button[type=\'submit\']::after{left:160%;}&:invalid button[type=\'submit\']::before{left:-60%;}'], (0, _themeGet2.default)('colors.background.disabled'), (0, _themeGet2.default)('colors.text.disabled'), (0, _themeGet2.default)('colors.background.disabled'));

Form.propTypes = {
  /**
   * Adds an id to the element.
   */
  id: _propTypes2.default.string,
  /**
   * Adds a class name to the element.
   */
  className: _propTypes2.default.string
};

Form.defaultProps = {
  id: null,
  className: null
};

Form.Column = _FormColumn2.default;
Form.Box = _FormBox2.default;

/**
 * @component
 */
exports.default = Form;