import { p as proxyCustomElement, H, c as createEvent, h } from './p-C6Ye8jK5.js';
import { D as DataTestIdsEnum } from './p-BPc6-DQj.js';
import { d as defineCustomElement$d } from './p-Dp2Dx35R.js';
import { d as defineCustomElement$c } from './p-DD-9v61V.js';
import { d as defineCustomElement$b } from './p-BrB7y7_B.js';
import { d as defineCustomElement$a } from './p-UIJctTy4.js';
import { d as defineCustomElement$9 } from './p-CCX_CRf7.js';
import { d as defineCustomElement$8 } from './p-CLdeeA1V.js';
import { d as defineCustomElement$7 } from './p-C3uWH4o6.js';
import { d as defineCustomElement$6 } from './p-BQsPwFfM.js';
import { d as defineCustomElement$5 } from './p-enJS7zcE.js';
import { d as defineCustomElement$4 } from './p-BrIzAT7l.js';
import { d as defineCustomElement$3 } from './p-CQXUsCLP.js';
import { d as defineCustomElement$2 } from './p-CfF5eaUv.js';
import { d as defineCustomElement$1 } from './p-B7eBI6ju.js';

const TOTAL_ADDRESSES_COUNT = 5000;

const ledgerAddressesCss = "/*! 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;:host{display:flex;flex:1;flex-direction:column}.ledger-addresses{display:flex;flex:1;flex-direction:column;font-family:Satoshi,sans-serif;gap:16px}.ledger-addresses .ledger-addresses-label{color:#fff;line-height:1}.ledger-addresses .ledger-addresses-list{display:flex;flex-direction:column;gap:4px}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item{align-items:center;border:1px solid #0000;border-radius:8px;color:#fff;cursor:pointer;display:flex;height:64px;padding:16px;position:relative;transition:all .2s;width:100%}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item:before{background-color:#353535;border-radius:8px;content:\"\";inset:0;opacity:.3;pointer-events:none;position:absolute}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item.checked,.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item:hover{border-color:#23f7dd}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-checkbox{border:1px solid #fff;border-radius:50%;height:16px;margin-right:8px;max-width:16px;min-width:16px;position:relative;transition:all .2s;z-index:1}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-checkbox:after{background-color:#23f7dd;border-radius:50%;content:\"\";height:6px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:all .2s;width:6px}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-checkbox.checked{border-color:#23f7dd}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-checkbox.checked:after{opacity:1}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-index{color:#a09a93;font-size:16px;font-weight:500;margin-right:16px;position:relative;transition:all .2s;z-index:1}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-index.checked{color:#23f7dd}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-address{font-size:16px;margin-right:auto;max-width:160px;min-width:0;position:relative;z-index:1}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-address .trim-wrapper{align-items:flex-end}.ledger-addresses .ledger-addresses-list .ledger-addresses-list-item .ledger-addresses-list-item-balance{font-size:16px;font-weight:500;margin-left:16px;position:relative;z-index:1}.ledger-addresses .ledger-addresses-button{align-items:center;background-color:#23f7dd;border:1px solid #23f7dd;border-radius:12px;color:#000;cursor:pointer;display:flex;font-size:16px;font-weight:700;gap:8px;height:48px;justify-content:center;line-height:1;transition:all .2s;width:100%}.ledger-addresses .ledger-addresses-button:hover{opacity:.75}";

const LedgerAddresses = /*@__PURE__*/ proxyCustomElement(class LedgerAddresses extends H {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
        this.accessWallet = createEvent(this, "accessWallet", 7);
        this.selectAccount = createEvent(this, "selectAccount", 1);
        this.pageChange = createEvent(this, "pageChange", 7);
    }
    handleAccessWallet(event) {
        event.preventDefault();
        this.accessWallet.emit();
    }
    handleSelectAccount(accountDerivationIndex) {
        return () => {
            this.selectAccount.emit(accountDerivationIndex);
        };
    }
    render() {
        const isAddressesLoading = this.accountScreenData.isLoading || this.accountScreenData.accounts.length === 0;
        const totalPages = Math.ceil(TOTAL_ADDRESSES_COUNT / this.accountScreenData.addressesPerPage);
        if (isAddressesLoading) {
            return h("mvx-ledger-intro", { isAwaiting: true });
        }
        return (h("div", { class: "ledger-addresses" }, h("div", { class: "ledger-addresses-label" }, "Choose the wallet you want to access"), h("div", { class: "ledger-addresses-list" }, this.accountScreenData.accounts.map((accountDerivation, accountDerivationIndex) => (h("div", { class: { 'ledger-addresses-list-item': true, 'checked': accountDerivation.index === this.selectedIndex }, onClick: this.handleSelectAccount(accountDerivation.index) }, h("div", { class: { 'ledger-addresses-list-item-checkbox': true, 'checked': accountDerivation.index === this.selectedIndex } }), h("div", { class: { 'ledger-addresses-list-item-index': true, 'checked': accountDerivation.index === this.selectedIndex } }, "#", accountDerivationIndex + 1 + this.accountScreenData.startIndex), h("mvx-trim-text", { text: accountDerivation.address, class: "ledger-addresses-list-item-address" }), h("div", { class: "ledger-addresses-list-item-balance" }, accountDerivation.usdValue))))), h("mvx-pagination", { totalPages: totalPages, class: "ledger-address-pagination", currentPage: this.accountScreenData.startIndex / this.accountScreenData.addressesPerPage + 1, onPageChange: (event) => this.pageChange.emit(event.detail) }), h("button", { class: "ledger-addresses-button", "data-testid": DataTestIdsEnum.confirmBtn, onClick: this.handleAccessWallet.bind(this) }, "Access Wallet")));
    }
    static get style() { return ledgerAddressesCss; }
}, [1, "mvx-ledger-addresses", {
        "accountScreenData": [16, "account-screen-data"],
        "selectedIndex": [2, "selected-index"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["mvx-ledger-addresses", "mvx-angle-left-icon", "mvx-angle-right-icon", "mvx-angles-left-icon", "mvx-angles-right-icon", "mvx-ledger-icon", "mvx-ledger-intro", "mvx-magnifying-glass-icon", "mvx-pagination", "mvx-pagination-ellipsis", "mvx-pagination-ellipsis-form", "mvx-spinner-icon", "mvx-tooltip", "mvx-trim-text"];
    components.forEach(tagName => { switch (tagName) {
        case "mvx-ledger-addresses":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, LedgerAddresses);
            }
            break;
        case "mvx-angle-left-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$d();
            }
            break;
        case "mvx-angle-right-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$c();
            }
            break;
        case "mvx-angles-left-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$b();
            }
            break;
        case "mvx-angles-right-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$a();
            }
            break;
        case "mvx-ledger-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$9();
            }
            break;
        case "mvx-ledger-intro":
            if (!customElements.get(tagName)) {
                defineCustomElement$8();
            }
            break;
        case "mvx-magnifying-glass-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$7();
            }
            break;
        case "mvx-pagination":
            if (!customElements.get(tagName)) {
                defineCustomElement$6();
            }
            break;
        case "mvx-pagination-ellipsis":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "mvx-pagination-ellipsis-form":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "mvx-spinner-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "mvx-tooltip":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "mvx-trim-text":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { LedgerAddresses as L, defineCustomElement as d };
//# sourceMappingURL=p-CPtJMCnd.js.map

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