import _extends from "@babel/runtime/helpers/extends";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["className", "children", "longForm"];
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import { settings } from '../../globals/js';
var prefix = settings.prefix;
/** A form is a group of related input controls that allows users to provide data or configure options. */

var Form = function Form(_ref) {
  var className = _ref.className,
      children = _ref.children,
      longForm = _ref.longForm,
      other = _objectWithoutProperties(_ref, _excluded);

  var classNames = classnames("".concat(prefix, "--form"), _defineProperty({}, "".concat(prefix, "--form-long"), longForm === true), className);
  return /*#__PURE__*/React.createElement("form", _extends({
    className: classNames
  }, other), children);
};

Form.propTypes = {
  /**
   * Provide children to be rendered inside of the <form> element
   */
  children: PropTypes.node,

  /**
   * Provide a custom className to be applied on the containing <form> node
   */
  className: PropTypes.string,

  /**
   * Default margin is added to each form input
   */
  longForm: PropTypes.bool
};
Form.defaultProps = {
  longForm: true
};
export default Form;