import { h } from "@stencil/core";
import classNames from "classnames";
import { DataTestIdsEnum } from "../../../constants/dataTestIds.enum";
const COLUMNS = ['TxHash', 'Age', 'Shard', 'From', 'To', 'Method', 'Value'];
export class TransactionsTable {
    render() {
        return (h("table", { key: '9f7f1bd74aa83851e75447b300cba42b96c0d92b', class: classNames(this.class, 'transactions-table') }, h("thead", { key: 'e2d4e14850e8c11ec46c6ccda2a886ea2764c5b9', class: "transactions-table-header" }, h("tr", { key: '79aff925fcc42ecf87d419b6db79c6da0be0688b' }, COLUMNS.map(column => (h("th", { key: column, scope: "col", class: "transactions-table-header-cell" }, column))))), h("tbody", { key: 'bec3b05fd8c548891729ae6c09782ba8e964004d', class: "transactions-table-body" }, this.transactions.map(transaction => (h("tr", { class: "transactions-table-body-row" }, h("td", { class: "transactions-table-body-cell" }, h("mvx-transaction-hash", { transaction: transaction })), h("td", { class: "transactions-table-body-cell" }, h("mvx-transaction-age", { age: transaction.age.timeAgo, tooltip: transaction.age.tooltip })), h("td", { class: "transactions-table-body-cell" }, h("mvx-transaction-shards", { transaction: transaction })), h("td", { class: "transactions-table-body-cell" }, h("mvx-transaction-account", { account: transaction.sender, dataTestId: DataTestIdsEnum.transactionSender, scope: "sender", showLockedAccounts: true })), h("td", { class: "transactions-table-body-cell" }, h("mvx-transaction-account", { account: transaction.receiver, dataTestId: DataTestIdsEnum.transactionReceiver, scope: "receiver", showLockedAccounts: true })), h("td", { class: "transactions-table-body-cell" }, h("mvx-transaction-method", { method: transaction.method.name, actionDescription: transaction.method.actionDescription })), h("td", { class: "transactions-table-body-cell" }, h("mvx-transaction-value", { value: transaction.value }))))))));
    }
    static get is() { return "mvx-transactions-table"; }
    static get originalStyleUrls() {
        return {
            "$": ["transactions-table.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["transactions-table.css"]
        };
    }
    static get properties() {
        return {
            "class": {
                "type": "string",
                "attribute": "class",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "transactions": {
                "type": "unknown",
                "attribute": "transactions",
                "mutable": false,
                "complexType": {
                    "original": "ITransactionsTableRow[]",
                    "resolved": "ITransactionsTableRow[]",
                    "references": {
                        "ITransactionsTableRow": {
                            "location": "import",
                            "path": "./transactions-table.type",
                            "id": "src/components/controlled/transactions-table/transactions-table.type.ts::ITransactionsTableRow"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            }
        };
    }
}
//# sourceMappingURL=transactions-table.js.map
