"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const chain_1 = require("../_libs/chain");
function Transaction({ locale, data, }) {
    const chainHost = (0, chain_1.getChainHost)(data.chainId);
    const url = `https://${chainHost}/explorer/txs/${data.hash}`;
    const title = { zh: '交易详情', en: 'Transaction Details' }[locale] || 'Transaction Details';
    const subTitle = { zh: '交易哈希', en: 'Transaction Hash' }[locale] || 'Transaction Hash';
    return ((0, jsx_runtime_1.jsxs)("a", { href: url, target: "_blank", style: {
            margin: '1em 0',
            textDecoration: 'none',
            color: 'initial',
            display: 'block',
        }, children: [(0, jsx_runtime_1.jsx)("h6", { style: { color: '#a5a5a5', margin: 0 }, children: chainHost }), (0, jsx_runtime_1.jsx)("p", { style: { color: '#4598fa', margin: '6px 0' }, children: title }), (0, jsx_runtime_1.jsxs)("div", { children: [subTitle, ": ", data.hash] })] }));
}
exports.default = Transaction;
