var _excluded = ["checked", "children", "className", "error", "indeterminate", "style"],
  _excluded2 = ["checked", "children", "className", "disabled", "error", "indeterminate", "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 { StyledCheckboxContainer, StyledCheckboxInput, StyledCheckboxLabel, StyledFakeCheckboxInput, StyledFakeCheckboxLabel } from './Checkbox.styles';
/**


 We use checkboxes to provide users with the ability to either select or
 deselect multiple values from a list of options (e.g. items on list pages),
 or to select or deselect a single option (e.g. settings on configure pages).

 @since 10.19.0

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

 @see [Design Guidelines](https://design.procore.com/checkbox)

 */
export var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_ref, ref) {
  var checked = _ref.checked,
    children = _ref.children,
    className = _ref.className,
    _ref$error = _ref.error,
    error = _ref$error === void 0 ? false : _ref$error,
    _ref$indeterminate = _ref.indeterminate,
    indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
    style = _ref.style,
    props = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(StyledCheckboxContainer, {
    className: className,
    style: style
  }, /*#__PURE__*/React.createElement(StyledCheckboxInput, _extends({}, props, {
    "aria-checked": indeterminate ? 'mixed' : checked,
    type: "checkbox",
    checked: checked,
    $error: error,
    $indeterminate: indeterminate,
    ref: ref
  })), /*#__PURE__*/React.createElement(StyledCheckboxLabel, null, children));
});
Checkbox.displayName = 'Checkbox';

/**
 *  This checkbox was created to be used as a non-interactive Checkbox component
 *  for VoiceOver inside MenuImperative.CheckboxItem.
 *
 *  @since 11.3.0
 */

export var FakeCheckbox = /*#__PURE__*/React.forwardRef(function FakeCheckbox(_ref2, ref) {
  var _ref2$checked = _ref2.checked,
    checked = _ref2$checked === void 0 ? false : _ref2$checked,
    children = _ref2.children,
    className = _ref2.className,
    _ref2$disabled = _ref2.disabled,
    disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
    _ref2$error = _ref2.error,
    error = _ref2$error === void 0 ? false : _ref2$error,
    _ref2$indeterminate = _ref2.indeterminate,
    indeterminate = _ref2$indeterminate === void 0 ? false : _ref2$indeterminate,
    style = _ref2.style,
    props = _objectWithoutProperties(_ref2, _excluded2);
  return /*#__PURE__*/React.createElement(StyledCheckboxContainer, {
    className: className,
    style: style,
    as: "div"
  }, /*#__PURE__*/React.createElement(StyledFakeCheckboxInput, _extends({}, props, {
    $checked: checked,
    $disabled: disabled,
    $error: error,
    $indeterminate: indeterminate,
    ref: ref
  })), /*#__PURE__*/React.createElement(StyledFakeCheckboxLabel, {
    $checked: checked,
    $disabled: disabled
  }, children));
});
FakeCheckbox.displayName = 'FakeCheckbox';
//# sourceMappingURL=Checkbox.js.map