"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Chip = _interopRequireDefault(require("@material-ui/core/Chip"));
var _chipProps = _interopRequireWildcard(require("./chipProps"));
var _classnames = _interopRequireDefault(require("classnames"));
var _styles = require("@material-ui/core/styles");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var useStyles = (0, _styles.makeStyles)(function (theme) {
  return {
    root: {
      backgroundColor: theme.palette.primary.main,
      color: theme.palette.primary.contrastText,
      minWidth: theme.spacing(6)
    },
    disabled: {
      backgroundColor: theme.palette.grey.borders,
      color: theme.palette.text.primary
    }
  };
});
var Chip = function Chip(_ref) {
  var label = _ref.label,
    chipProps = _ref.chipProps;
  var classes = useStyles();
  if ((0, _chipProps.isChipProps)(chipProps) === false) {
    throw new TypeError("chipProps property is not of type ChipProps");
  }
  var avatar = (chipProps == null ? void 0 : chipProps.get(_chipProps.default.propNames.avatar)) || null;
  var clickable = (chipProps == null ? void 0 : chipProps.get(_chipProps.default.propNames.clickable)) || false;
  var disabled = (chipProps == null ? void 0 : chipProps.get(_chipProps.default.propNames.disabled)) || false;
  var onDelete = (chipProps == null ? void 0 : chipProps.get(_chipProps.default.propNames.onDelete)) || null;
  var variant = (chipProps == null ? void 0 : chipProps.get(_chipProps.default.propNames.variant)) || "default";
  var chip = /*#__PURE__*/_react.default.createElement(_Chip.default, {
    label: label,
    avatar: avatar,
    clickable: clickable,
    disabled: disabled,
    onDelete: onDelete,
    variant: variant,
    classes: {
      root: (0, _classnames.default)(classes.root, chipProps == null ? void 0 : chipProps.getStyle(_chipProps.default.ruleNames.root)),
      disabled: classes.disabled
    }
  });
  return chip;
};
__signature__(Chip, "useStyles{classes}", function () {
  return [useStyles];
});
__signature__(Chip, "useStyles{classes}", function () {
  return [useStyles];
});
var _default = Chip;
var _default2 = _default;
var _default3 = exports.default = _default2;
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Chip.js");
  reactHotLoader.register(Chip, "Chip", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Chip.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Chip.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Chip.js");
  reactHotLoader.register(Chip, "Chip", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Chip.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Chip.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();