"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const components_1 = require("@react-email/components");
const attachments_1 = __importDefault(require("./attachments"));
const actions_1 = __importDefault(require("./actions"));
const activity_1 = __importDefault(require("./activity"));
const highlight_1 = require("../_libs/highlight");
const style_1 = require("../_libs/style");
function Content({ title, content, attachments = [], actions = [], style = {}, locale, raw = false, severity = 'normal', body = null, activity = null, actor = null, siteDomain = '', userInfo, }) {
    return ((0, jsx_runtime_1.jsxs)(components_1.Section, { style: style, children: [title ? (0, jsx_runtime_1.jsx)(components_1.Heading, { style: style_1.h1Style, children: title }) : null, activity ? ((0, jsx_runtime_1.jsx)(activity_1.default, { activity: activity, actor: actor, siteDomain: siteDomain, severity: severity, userInfo: userInfo })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [content ? ((0, jsx_runtime_1.jsx)(components_1.Text, { className: "content", style: { whiteSpace: 'pre-line!important' }, dangerouslySetInnerHTML: { __html: raw ? content : (0, highlight_1.toClickableSpan)(content) } })) : null, body, (0, jsx_runtime_1.jsx)(attachments_1.default, { severity: severity, attachments: attachments, locale: locale })] })), (0, jsx_runtime_1.jsx)(actions_1.default, { actions: actions })] }));
}
exports.default = Content;
