"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExampleMailable = void 0;
const react_1 = __importDefault(require("react"));
const _1 = require(".");
const { Email, EmailRow, EmailCol, EmailTable, EmailButton } = _1.Components;
class ExampleMailable extends _1.Mailable {
    constructor(token) {
        super();
        this.token = token;
        this.subject = 'Test';
        this.from = {
            email: 'test@test.com',
        };
    }
    view() {
        return __awaiter(this, void 0, void 0, function* () {
            const somethingElse = yield new Promise(resolve => setTimeout(() => resolve('hello'), 500));
            const header = (react_1.default.createElement(EmailTable, null,
                react_1.default.createElement(EmailRow, null,
                    react_1.default.createElement(EmailCol, { className: "pb-4" },
                        react_1.default.createElement("img", { src: "https://cdn.tellimer.com/newsletters/today-header.png", height: "48" })))));
            const footer = (react_1.default.createElement(EmailTable, null,
                react_1.default.createElement(EmailRow, null,
                    react_1.default.createElement(EmailCol, { className: "pb-4 text-center" },
                        "Osprey",
                        react_1.default.createElement("br", null),
                        "Some address dr, New Jersey 07201"))));
            return (react_1.default.createElement(Email, { header: header, footer: footer },
                react_1.default.createElement(EmailTable, null,
                    react_1.default.createElement(EmailRow, null,
                        react_1.default.createElement(EmailCol, { className: "py-2" }, "Hi there person,")),
                    react_1.default.createElement(EmailRow, null,
                        react_1.default.createElement(EmailCol, { className: "py-2" },
                            "this is your token: ",
                            this.token,
                            " ... ",
                            somethingElse)),
                    react_1.default.createElement(EmailRow, null,
                        react_1.default.createElement(EmailCol, { className: "py-2" },
                            react_1.default.createElement(EmailButton, { href: "#" }, "This is an awesome test!"))))));
        });
    }
}
exports.ExampleMailable = ExampleMailable;
