"use strict";

exports.__esModule = true;
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));

var _paperProps = _interopRequireWildcard(require("./paperProps"));

var _classnames = _interopRequireDefault(require("classnames"));

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

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

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

(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 useStyle = (0, _styles.makeStyles)(function (theme) {
  return {
    container: {
      padding: theme.spacing(2),
      backgroundColor: theme.palette.grey.lighter
    }
  };
});

var Paper = function Paper(_ref) {
  var content = _ref.content,
      paperProps = _ref.paperProps;

  if ((0, _paperProps.isPaperProps)(paperProps) === false) {
    throw new TypeError("paperProps property is not of type PaperProps");
  }

  var classes = useStyle();
  var elevation = (paperProps == null ? void 0 : paperProps.get(_paperProps.default.propNames.elevation)) || 0;
  var square = (paperProps == null ? void 0 : paperProps.get(_paperProps.default.propNames.square)) || false;
  var variant = (paperProps == null ? void 0 : paperProps.get(_paperProps.default.propNames.variant)) || "outlined";
  var rootStyle = paperProps == null ? void 0 : paperProps.getStyle(_paperProps.default.ruleNames.root);
  return /*#__PURE__*/_react.default.createElement(_Paper.default, {
    classes: {
      root: (0, _classnames.default)(classes.container, rootStyle)
    },
    elevation: elevation,
    square: square,
    variant: variant
  }, content);
};

__signature__(Paper, "useStyle{classes}", function () {
  return [useStyle];
});

__signature__(Paper, "useStyle{classes}", function () {
  return [useStyle];
});

var _default = Paper;
var _default2 = _default;
var _default3 = _default2;
exports.default = _default3;
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(useStyle, "useStyle", "/home/vsts/work/1/s/src/components/MaterialUI/Surfaces/Paper.js");
  reactHotLoader.register(Paper, "Paper", "/home/vsts/work/1/s/src/components/MaterialUI/Surfaces/Paper.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Surfaces/Paper.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(useStyle, "useStyle", "/home/vsts/work/1/s/src/components/MaterialUI/Surfaces/Paper.js");
  reactHotLoader.register(Paper, "Paper", "/home/vsts/work/1/s/src/components/MaterialUI/Surfaces/Paper.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Surfaces/Paper.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();