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: 'fa94e5d1b8273df412c75adae3497e89da992cad', class: classNames(this.class, 'transactions-table') }, h("thead", { key: '9063b1800e5c707567dd331298e898ffb3c44f94', class: "transactions-table-header" }, h("tr", { key: 'be22fefa73df74a38ba2a86128d13bd486e8110c' }, COLUMNS.map(column => (h("th", { key: column, scope: "col", class: "transactions-table-header-cell" }, column))))), h("tbody", { key: '80f5b6dbb21434496b76e725ea390d146cc26785', class: "transactions-table-body" }, this.transactions.map(transaction => (h("tr", { class: "transactions-table-body-row" }, h("td", { class: "transactions-table-body-cell" }, h("transaction-hash", { transaction: transaction })), h("td", { class: "transactions-table-body-cell" }, h("transaction-age", { age: transaction.age.timeAgo, tooltip: transaction.age.tooltip })), h("td", { class: "transactions-table-body-cell" }, h("transaction-shards", { transaction: transaction })), h("td", { class: "transactions-table-body-cell" }, h("transaction-account", { account: transaction.sender, dataTestId: DataTestIdsEnum.transactionSender, scope: "sender", showLockedAccounts: true })), h("td", { class: "transactions-table-body-cell" }, h("transaction-account", { account: transaction.receiver, dataTestId: DataTestIdsEnum.transactionReceiver, scope: "receiver", showLockedAccounts: true })), h("td", { class: "transactions-table-body-cell" }, h("transaction-method", { method: transaction.method.name, actionDescription: transaction.method.actionDescription })), h("td", { class: "transactions-table-body-cell" }, h("transaction-value", { value: transaction.value }))))))));
    }
    static get is() { return "transactions-table"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["transactions-table.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["transactions-table.css"]
        };
    }
    static get properties() {
        return {
            "class": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "class",
                "reflect": false
            },
            "transactions": {
                "type": "unknown",
                "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
