"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _core = require("@emotion/core");

var _propTypes = _interopRequireDefault(require("prop-types"));

var _Checkbox = _interopRequireDefault(require("@material-ui/core/Checkbox"));

var _FormControlLabel = _interopRequireDefault(require("@material-ui/core/FormControlLabel"));

var _styles = require("@material-ui/styles");

var _uiThemes = require("@hackoregon/ui-themes");

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

var Checkbox = function Checkbox(_ref) {
  var variant = _ref.variant,
      onChange = _ref.onChange,
      disabled = _ref.disabled,
      value = _ref.value,
      label = _ref.label,
      labelPlacement = _ref.labelPlacement;
  return (0, _core.jsx)(_styles.ThemeProvider, {
    theme: _uiThemes.MaterialTheme
  }, (0, _core.jsx)(_FormControlLabel["default"], {
    value: label,
    control: (0, _core.jsx)(_Checkbox["default"], {
      checked: value,
      variant: variant,
      onChange: onChange,
      disabled: disabled,
      inputProps: {
        "aria-label": {
          label: label
        }
      }
    }),
    label: label,
    labelPlacement: labelPlacement
  }));
};

Checkbox.displayName = "Checkbox";
Checkbox.propTypes = {
  value: _propTypes["default"].bool,
  label: _propTypes["default"].string,
  labelPlacement: _propTypes["default"].string,
  variant: _propTypes["default"].string,
  disabled: _propTypes["default"].bool,
  onChange: _propTypes["default"].func
};
Checkbox.defaultProps = {
  value: false,
  label: "Label",
  labelPlacement: "end",
  variant: "contained",
  disabled: false
};
var _default = Checkbox;
exports["default"] = _default;