"use strict";

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

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

var _components = require("@patternplate/components");

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

var _default = Message;
exports.default = _default;

function Message(props) {
  return _react.default.createElement(StyledMessage, null, _react.default.createElement(StyledMessageContent, null, props.message, props.details && _react.default.createElement(StyledDetails, null, props.summary && _react.default.createElement(StyledSummary, null, props.summary), props.details)));
}

const StyledMessage = _components.styled.div.withConfig({
  displayName: "message__StyledMessage"
})(["background:", ";box-sizing:border-box;width:100%;padding:10px 20px;"], props => props.theme.error);

const StyledMessageContent = _components.styled.pre.withConfig({
  displayName: "message__StyledMessageContent"
})(["color:#fff;max-height:calc(100vh - 160px);overflow:scroll;"]);

const StyledDetails = _components.styled.details.withConfig({
  displayName: "message__StyledDetails"
})(["margin:10px 0;"]);

const StyledSummary = _components.styled.summary.withConfig({
  displayName: "message__StyledSummary"
})(["outline:none;cursor:pointer;user-select:none;"]);
//# sourceMappingURL=message.js.map