var _excluded = ["children", "className", "error", "style"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';
import { StyledRadioButton, StyledRadioButtonInput, StyledRadioButtonLabel } from './RadioButton.styles';
/**

 We use radio buttons to allow users to select a single, exclusive option from
 a list of multiple options.

 To present options in a dropdown, use a single select.

 @since 10.19.0

 @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-radiobutton--demo)

 @see [Design Guidelines](https://design.procore.com/radio-button)

 */
export var RadioButton = /*#__PURE__*/React.forwardRef(function RadioButton(_ref, ref) {
  var children = _ref.children,
    className = _ref.className,
    _ref$error = _ref.error,
    error = _ref$error === void 0 ? false : _ref$error,
    style = _ref.style,
    props = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(StyledRadioButton, {
    className: className,
    style: style,
    $children: children,
    $error: error
  }, /*#__PURE__*/React.createElement(StyledRadioButtonInput, _extends({
    type: "radio",
    ref: ref
  }, props)), /*#__PURE__*/React.createElement(StyledRadioButtonLabel, null, children));
});
RadioButton.displayName = 'RadioButton';
//# sourceMappingURL=RadioButton.js.map