import { p as proxyCustomElement, H, c as createEvent, h } from './p-C6Ye8jK5.js';
import { c as faTimes } from './p-K2hYtZxB.js';
import { D as DataTestIdsEnum } from './p-BPc6-DQj.js';
import { d as defineCustomElement$7 } from './p-DGL5LKdi.js';
import { d as defineCustomElement$6 } from './p-BTr9ynNz.js';
import { d as defineCustomElement$5 } from './p-BOLa00ln.js';
import { d as defineCustomElement$4 } from './p-Bwx2qLgZ.js';
import { d as defineCustomElement$3 } from './p-Z47P6uRI.js';
import { d as defineCustomElement$2 } from './p-B-rVOxXs.js';
import { d as defineCustomElement$1 } from './p-B7eBI6ju.js';

const transactionToastContentCss = "/*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--mvx-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--mvx-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--mvx-default-font-family:var(--mvx-font-sans);--mvx-default-mono-font-family:var(--mvx-font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--mvx-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--mvx-default-font-feature-settings,normal);font-variation-settings:var(--mvx-default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--mvx-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--mvx-default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--mvx-default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentColor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities;.transaction-toast-content-wrapper{align-items:flex-start;-webkit-backdrop-filter:blur(38px);backdrop-filter:blur(38px);background:var(--mx-tx-bg);border:.5px solid var(--mx-tx-bg);border-radius:12px;color:var(--mx-tx-text-primary);display:flex;flex-direction:column;gap:4px;max-width:400px;padding:12px;position:relative}.transaction-toast-content-wrapper .svg-inline--fa{color:var(--mx-tx-text-primary)}.transaction-toast-content-wrapper.full-width{max-width:100%}.transaction-toast-content{align-items:flex-start;align-self:stretch;display:flex;gap:12px}.transaction-toast-icon,.transaction-toast-icon .svg-inline--fa,.transaction-toast-icon img,.transaction-toast-icon svg{border-radius:50%;height:20px;width:20px}.transaction-toast-details{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;gap:4px}.transaction-toast-details-header{align-items:center;align-self:stretch;display:flex;gap:12px;justify-content:space-between;padding:0}.transaction-toast-title{color:var(--mx-tx-text-primary);font-family:var(--font-family-roobert);font-size:16px;font-style:normal;font-weight:700;line-height:140%;margin:0;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.transaction-toast-title-short{max-width:160px}.transaction-toast-content-wrapper.full-width .transaction-toast-title{max-width:100%}.transaction-toast-amount{color:var(--mx-tx-text-primary);font-family:var(--font-family-roobert);font-size:16px;font-style:normal;font-weight:400;letter-spacing:-.14px}.transaction-toast-details-info{align-items:flex-start;align-self:stretch;display:flex;gap:4px}.transaction-toast-details-info-text{color:var(--mx-tx-text-secondary);font-family:var(--font-family-roobert);font-size:16px;font-style:normal;font-weight:400;letter-spacing:-.14px;line-height:16px;max-width:160px}.transaction-toast-details-info-icon,.transaction-toast-details-info-icon img{border-radius:50%;height:16px;width:16px}.transaction-toast-action-button{color:var(--mx-tx-text-primary);display:flex;flex-direction:column;flex-shrink:0;height:14px;justify-content:center;width:14px}.transaction-toast-action-button .svg-inline--fa{color:var(--mx-tx-text-primary);height:14px;text-align:center}";

const TransactionToastContent = /*@__PURE__*/ proxyCustomElement(class TransactionToastContent extends H {
    constructor() {
        super();
        this.__registerHost();
        this.deleteToast = createEvent(this, "deleteToast", 7);
    }
    handleDeleteToast() {
        this.deleteToast.emit();
    }
    renderPrimaryIcon() {
        var _a, _b;
        const transaction = (_a = this.transactions) === null || _a === void 0 ? void 0 : _a[0];
        if (!(transaction === null || transaction === void 0 ? void 0 : transaction.asset)) {
            return h("mvx-default-transaction-icon-small", null);
        }
        if (transaction.asset.imageUrl) {
            return h("img", { src: transaction.asset.imageUrl, alt: "Transaction icon", class: "transaction-toast-icon", loading: "lazy" });
        }
        if (transaction.asset.icon) {
            return h("mvx-fa-icon", { icon: transaction.asset.icon, class: "transaction-toast-icon" });
        }
        if (transaction.asset.text) {
            return h("span", { class: "transaction-toast-icon" }, transaction.asset.text);
        }
        if (this.toastDataState.icon) {
            return h("fa-icon", { icon: this.toastDataState.icon, class: `transaction-toast-icon ${(_b = this.toastDataState.iconClassName) !== null && _b !== void 0 ? _b : ''}` });
        }
        return h("mvx-default-transaction-icon-small", null);
    }
    renderDetails() {
        var _a;
        const transaction = (_a = this.transactions) === null || _a === void 0 ? void 0 : _a[0];
        if (!transaction) {
            return null;
        }
        return (h("div", { class: "transaction-toast-details-info" }, transaction.directionLabel && h("span", { class: "transaction-toast-details-info-text" }, transaction.directionLabel), h("div", { class: "transaction-toast-details-info-icon" }, transaction.interactorAsset ? h("img", { src: transaction.interactorAsset, alt: "Service icon", loading: "lazy" }) : h("mvx-default-transaction-icon-small", null)), h("mvx-trim-text", { text: transaction.interactor, class: "transaction-toast-details-info-text" })));
    }
    render() {
        var _a;
        const { title, hasCloseButton } = this.toastDataState;
        const transaction = this.transactions[0];
        const showAmount = this.transactions.length === 1 && (transaction === null || transaction === void 0 ? void 0 : transaction.amount);
        const showExplorerLinkButton = (transaction === null || transaction === void 0 ? void 0 : transaction.link) && this.transactions.length === 1;
        return (h("div", { key: '5efff505e6d9628641553f02b36eef143d695e02', class: {
                'transaction-toast-content-wrapper': true,
                'full-width': this.fullWidth,
            }, "data-testid": DataTestIdsEnum.transactionToastContent }, h("div", { key: 'cf62356816fea007a834b810dbcbda9d9b407fa2', class: "transaction-toast-content" }, h("div", { key: 'e7382f49caa792f945f44b094363a1fcc8537d2e', class: "transaction-toast-icon" }, this.renderPrimaryIcon()), h("div", { key: '48906f4fbc152866cb1aeaf24384f3c7f1896d9a', class: "transaction-toast-details" }, h("div", { key: '8086cd840a9ddf64d74017861c56046f9f5d1f00', class: "transaction-toast-details-header" }, h("h4", { key: 'df1b8dd917d5c5b504393c0c76e6439cf868fc54', class: {
                'transaction-toast-title': true,
                'transaction-toast-title-short': Boolean(showAmount),
            } }, title || ((_a = transaction === null || transaction === void 0 ? void 0 : transaction.action) === null || _a === void 0 ? void 0 : _a.name)), showAmount && h("div", { key: 'f08d5b9c31b798332ccd9dad65ae419dba8708f1', class: "transaction-toast-amount" }, transaction.amount)), this.renderDetails()), hasCloseButton && h("fa-icon", { key: 'eefe58772ba4d6e3f025f27c1311dd41d44f270d', icon: faTimes, class: "transaction-toast-close-icon", onClick: this.handleDeleteToast.bind(this) }), !hasCloseButton && showExplorerLinkButton && h("mvx-explorer-link", { key: '70b7ad2e590b31a98c22d9866253d6dd86228090', link: transaction.link, class: "transaction-toast-action-button" })), !showExplorerLinkButton && h("mvx-transaction-toast-details", { key: '6e73eb2917b8d7aec13b907711f5d7b2d0944938', transactions: this.transactions, processedTransactionsStatus: this.processedTransactionsStatus })));
    }
    static get style() { return transactionToastContentCss; }
}, [0, "mvx-transaction-toast-content", {
        "transactions": [16],
        "toastDataState": [16, "toast-data-state"],
        "processedTransactionsStatus": [1, "processed-transactions-status"],
        "fullWidth": [4, "full-width"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["mvx-transaction-toast-content", "mvx-copy-button", "mvx-default-transaction-icon-small", "mvx-explorer-link", "mvx-fa-icon", "mvx-transaction-toast-details", "mvx-transaction-toast-details-body", "mvx-trim-text"];
    components.forEach(tagName => { switch (tagName) {
        case "mvx-transaction-toast-content":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, TransactionToastContent);
            }
            break;
        case "mvx-copy-button":
            if (!customElements.get(tagName)) {
                defineCustomElement$7();
            }
            break;
        case "mvx-default-transaction-icon-small":
            if (!customElements.get(tagName)) {
                defineCustomElement$6();
            }
            break;
        case "mvx-explorer-link":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "mvx-fa-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "mvx-transaction-toast-details":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "mvx-transaction-toast-details-body":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "mvx-trim-text":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { TransactionToastContent as T, defineCustomElement as d };
//# sourceMappingURL=p-CRXhC20X.js.map

//# sourceMappingURL=p-CRXhC20X.js.map