'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-14914b7b.js');
const utils = require('./utils-ea4b6a17.js');
const dataTestIds_enum = require('./dataTestIds.enum-0f98ecfd.js');
const signTransactionsModalStore = require('./signTransactionsModalStore-e69ee459.js');

const signTransactionComponentCss = "* {\n  margin: 0;\n  padding: 0;\n  box-sizing: border-box;\n}\n\n.transaction-container {\n  display: flex;\n  flex-direction: column;\n  padding: 1rem;\n  gap: 2rem;\n}\n\n.receiver-container {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 4px;\n  line-height: 1;\n}\n\n.data-container {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 4px;\n  line-height: 1;\n}\n\n.data-content {\n  width: 100%;\n  height: 100px;\n  resize: none;\n  border-radius: 0.5rem;\n  padding: 0.5rem;\n}\n\n.fee-container {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 4px;\n  line-height: 1;\n}\n\n.sign-button {\n  display: block;\n  width: 200px;\n  margin: 0 auto;\n  padding: 12px;\n  background-color: #1a56db;\n  color: white;\n  border: none;\n  border-radius: 8px;\n  cursor: pointer;\n\n  &:disabled {\n    background-color: #a1a1a1;\n    color: #e0e0e0;\n    cursor: not-allowed;\n    opacity: 0.6;\n    box-shadow: none;\n    transform: none;\n  }\n}\n";
const SignTransactionComponentStyle0 = signTransactionComponentCss;

const SignTransaction = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.header = undefined;
    }
    render() {
        const { receiver, egldLabel, data, feeInFiatLimit, feeLimit } = signTransactionsModalStore.state.commonData;
        return (index.h("div", { key: '758739c9b41b09ebe00e75e2de8289fd37bc04ac', class: "transaction-container" }, this.header, index.h("div", { key: '9e6d83309d4c18831b96224c55e4813ff46dabdd', class: "receiver-container" }, index.h("p", { key: '5b76bbf45e23c9fe7595af58e236aadb83c422d8' }, "To"), index.h("p", { key: '11ee3ea351277f05a88d44f8c4688cc83b44db8e' }, utils.formatAddress(receiver, 40))), index.h("div", { key: '7119f43fac19a6f13f6deea6120f532751908dfb', class: "fee-container" }, index.h("p", { key: 'b04725da10d8ce01be1d7e131dca86834d288788' }, "Transaction fee"), feeLimit && (index.h("p", { key: 'cd84e17563df80f767792d410730711b924351cf' }, index.h("span", { key: 'bbd857ed30118cb3de31646dd26d6cc29753216f' }, feeLimit), "\u00A0", index.h("span", { key: '59520cd678c5acf1e38ee6a540f197da01b34726' }, egldLabel))), index.h("p", { key: 'c9d4964c2ae2e6ad6b747d46ab00de02cf382590' }, "\u2248", feeInFiatLimit)), index.h("div", { key: '48b253f62a558205c368fd814e57fd1eec394b4f', class: "data-container" }, index.h("p", { key: 'd536a9fcee600ba017456797e91693991c3b5853' }, "Data"), index.h("textarea", { key: 'e6934a0c85dad180bbe954bfce259616486fbe8e', class: "data-content", readOnly: true, draggable: false }, data)), index.h("button", { key: '56d06021a0e17db28497bc2b933d761e9a934e5c', disabled: signTransactionsModalStore.state.isWaitingForSignature, "data-testid": dataTestIds_enum.DataTestIdsEnum.signTransactionBtn, class: "sign-button", onClick: signTransactionsModalStore.state.onSign }, "Sign")));
    }
};
SignTransaction.style = SignTransactionComponentStyle0;

exports.sign_transaction_component = SignTransaction;

//# sourceMappingURL=sign-transaction-component.cjs.entry.js.map