"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const components_1 = require("@react-email/components");
const google_fonts_1 = require("../_libs/google-fonts");
function Layout({ children, mainStyle = {}, containerStyle = {}, subject, theme, }) {
    var _a, _b, _c;
    const fontFamily = (_a = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _a === void 0 ? void 0 : _a.fontFamily;
    const headingFontFamily = (_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.h1) === null || _c === void 0 ? void 0 : _c.fontFamily;
    const googleFontsImport = (0, google_fonts_1.buildGoogleFontsImportFromMultiple)([fontFamily, headingFontFamily]);
    return ((0, jsx_runtime_1.jsxs)(components_1.Html, { children: [(0, jsx_runtime_1.jsxs)(components_1.Head, { children: [subject && (0, jsx_runtime_1.jsx)("title", { children: subject }), googleFontsImport && (0, jsx_runtime_1.jsx)("style", { children: googleFontsImport })] }), (0, jsx_runtime_1.jsx)(components_1.Body, { style: Object.assign(Object.assign({}, _mainStyle), mainStyle), children: (0, jsx_runtime_1.jsx)("div", { style: Object.assign(Object.assign({}, _mainStyle), mainStyle), children: (0, jsx_runtime_1.jsx)("div", { style: { padding: '0 10px 20px 10px' }, children: (0, jsx_runtime_1.jsx)(components_1.Container, { style: Object.assign(Object.assign({}, _containerStyle), containerStyle), children: (0, jsx_runtime_1.jsx)("div", { children: children }) }) }) }) })] }));
}
exports.default = Layout;
const _mainStyle = {
    backgroundColor: '#f2f2f2',
};
const _containerStyle = {
    margin: '0 auto',
    maxWidth: '50em',
};
