/** * Account Modal - Lit Component * * Framework-agnostic account management modal showing connected wallet details. * Uses lukso-modal from @lukso/web-components for consistent UI. */ import { safeCustomElement } from '@lukso/core/utils' import { html } from 'lit' import { property } from 'lit/decorators.js' import { CoreLitElement } from './styles' // Import lukso web components import '@lukso/web-components/dist/components/lukso-modal' import '@lukso/web-components/dist/components/lukso-button' @safeCustomElement('account-modal') export class AccountModal extends CoreLitElement { // Public properties @property({ type: Boolean, reflect: true }) open = false @property({ type: String }) theme: 'light' | 'dark' | 'auto' = 'auto' @property({ type: String }) address = '' @property({ type: Number }) chainId?: number @property({ type: String }) connectorName = '' private close() { this.open = false this.dispatchEvent(new CustomEvent('close')) } private handleDisconnect() { this.dispatchEvent(new CustomEvent('disconnect')) this.close() } private getChainName(): string { switch (this.chainId) { case 42: return 'LUKSO Mainnet' case 4201: return 'LUKSO Testnet' default: return this.chainId ? `Chain ${this.chainId}` : 'Unknown Network' } } render() { return html`

Connected Account

Connected
Address
${this.address}
Network
${this.getChainName()}
Connector
${this.connectorName || 'Unknown'}
Disconnect
` } }