"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));

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

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

var _Box = _interopRequireDefault(require("@material-ui/core/Box"));

var useStyles = function useStyles(props) {
  return (0, _styles.makeStyles)(function (theme) {
    return {
      root: {
        borderTop: "1px solid ".concat(theme.palette.common.black),
        borderTopLeftRadius: theme.shape.borderRadius,
        borderTopRightRadius: theme.shape.borderRadius,
        background: theme.palette.background.paper
      }
    };
  });
};

function Surface(_ref) {
  var children = _ref.children,
      style = _ref.style,
      props = (0, _objectWithoutProperties2.default)(_ref, ["children", "style"]);
  var classes = useStyles(props)();
  var classNames = "".concat(classes.root, " ").concat(props.className);
  return /*#__PURE__*/_react.default.createElement(_Box.default, {
    style: style,
    className: classNames
  }, children);
}

var _default = Surface;
exports.default = _default;