"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const components_1 = require("@react-email/components");
const chain_1 = require("../_libs/chain");
function Article({ data, }) {
    const host = (0, chain_1.getUrlHost)(data.url);
    return ((0, jsx_runtime_1.jsxs)("a", { href: data.url, target: "_blank", style: {
            textDecoration: 'none',
            color: 'initial',
            margin: '1em 0',
            display: 'block',
        }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
                    color: '#a5a5a5',
                    fontSize: '0.8em',
                }, children: host }), (0, jsx_runtime_1.jsx)(components_1.Text, { style: {
                    margin: 0,
                    color: '#4598fa',
                    whiteSpace: 'pre-line!important',
                }, children: data.title }), data.description && ((0, jsx_runtime_1.jsx)(components_1.Text, { style: {
                    margin: 0,
                    whiteSpace: 'pre-line!important',
                }, children: data.description })), data.image && ((0, jsx_runtime_1.jsx)(components_1.Img, { src: data.image, style: {
                    width: '100%',
                    height: '150px',
                    objectFit: 'contain',
                    objectPosition: 'left',
                } }))] }));
}
exports.default = Article;
