"use strict";

exports.__esModule = true;
exports.default = _default;

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

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

var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));

var _Icon = _interopRequireDefault(require("@mui/material/Icon"));

var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));

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

const PREFIX = 'SCBaseDialogTitle';
const Root = (0, _styles.styled)(_DialogTitle.default, {
  name: PREFIX,
  slot: 'Root',
  shouldForwardProp: prop => prop !== 'onClose',
  overridesResolver: (props, styles) => [styles.root]
})(({
  theme
}) => ({
  display: 'flex',
  alignItems: 'center',
  padding: '9px 10px 9px 15px'
}));

function _default({
  children = null,
  onClose = null
}) {
  return /*#__PURE__*/_react.default.createElement(Root, null, children, onClose ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
    "aria-label": "close",
    onClick: onClose,
    sx: {
      position: 'absolute',
      right: 8,
      top: 5,
      color: theme => theme.palette.grey[500]
    }
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, null, "close")) : null);
}