"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Email = void 0;
const react_1 = __importStar(require("react"));
const email_col_1 = require("./email-col");
const email_row_1 = require("./email-row");
const email_table_1 = require("./email-table");
class Email extends react_1.Component {
    render() {
        const width = this.props.width || 600;
        return (react_1.default.createElement(react_1.default.Fragment, null,
            react_1.default.createElement("p", { className: "email-preheader-text" }, this.props.preheaderText),
            react_1.default.createElement("table", { className: "email-container", role: "presentation" },
                this.props.header && (react_1.default.createElement("tr", null,
                    react_1.default.createElement("td", { align: "center" },
                        react_1.default.createElement("table", { role: "presentation", width: width, className: "email-header" },
                            react_1.default.createElement("tr", null,
                                react_1.default.createElement("td", null, this.props.header)))))),
                react_1.default.createElement("tr", null,
                    react_1.default.createElement("td", { align: "center" },
                        react_1.default.createElement(email_table_1.EmailTable, { className: "email-body", width: width },
                            react_1.default.createElement(email_row_1.EmailRow, null,
                                react_1.default.createElement(email_col_1.EmailCol, { className: "email-content" }, this.props.children))))),
                this.props.footer && (react_1.default.createElement("tr", null,
                    react_1.default.createElement("td", { align: "center" },
                        react_1.default.createElement("table", { role: "presentation", width: width, className: "email-footer" },
                            react_1.default.createElement("tr", null,
                                react_1.default.createElement("td", null, this.props.footer)))))))));
    }
}
exports.Email = Email;
