"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
var _styles = require("@material-ui/core/styles");
var _dividerProps = _interopRequireWildcard(require("./dividerProps"));
var _classnames = _interopRequireDefault(require("classnames"));
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 {
    dividerRoot: {
      backgroundColor: theme.palette.grey.dark
    },
    dividerLight: {
      backgroundColor: theme.palette.grey.borders
    },
    dividerVertical: {
      margin: "0 ".concat(theme.spacing(2))
    },
    inheritedWidth: {
      width: "inherit"
    }
  };
});
var Divider = function Divider(_ref) {
  var dividerProps = _ref.dividerProps;
  var classes = useStyles();
  if ((0, _dividerProps.isDividerProps)(dividerProps) === false) {
    throw new TypeError("dividerProps property is not of type DividerProps");
  }
  var orientation = (dividerProps == null ? void 0 : dividerProps.get(_dividerProps.default.propNames.orientation)) || "horizontal";
  var light = (dividerProps == null ? void 0 : dividerProps.get(_dividerProps.default.propNames.light)) || false;
  var variant = (dividerProps == null ? void 0 : dividerProps.get(_dividerProps.default.propNames.variant)) || "fullWidth";
  var flexItem = (dividerProps == null ? void 0 : dividerProps.get(_dividerProps.default.propNames.flexItem)) || false;
  var fullWidthHorizontalStyle = variant === "fullWidth" && orientation === "horizontal" ? classes.inheritedWidth : null;
  return /*#__PURE__*/_react.default.createElement(_Divider.default, {
    orientation: orientation,
    light: light,
    variant: variant,
    flexItem: flexItem,
    classes: {
      root: (0, _classnames.default)(classes.dividerRoot, fullWidthHorizontalStyle, dividerProps == null ? void 0 : dividerProps.getStyle(_dividerProps.default.ruleNames.root)),
      light: (0, _classnames.default)(classes.dividerLight, dividerProps == null ? void 0 : dividerProps.getStyle(_dividerProps.default.ruleNames.light)),
      vertical: (0, _classnames.default)(classes.dividerVertical, dividerProps == null ? void 0 : dividerProps.getStyle(_dividerProps.default.ruleNames.vertical)),
      middle: (0, _classnames.default)(dividerProps == null ? void 0 : dividerProps.getStyle(_dividerProps.default.ruleNames.middle)),
      inset: (0, _classnames.default)(dividerProps == null ? void 0 : dividerProps.getStyle(_dividerProps.default.ruleNames.inset))
    }
  });
};
__signature__(Divider, "useStyles{classes}", function () {
  return [useStyles];
});
__signature__(Divider, "useStyles{classes}", function () {
  return [useStyles];
});
var _default = Divider;
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/Divider.js");
  reactHotLoader.register(Divider, "Divider", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Divider.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Divider.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/Divider.js");
  reactHotLoader.register(Divider, "Divider", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Divider.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/DataDisplay/Divider.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();