class TranslatorWorkspace extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); this.bindEvents(); // Listen for state changes window.addEventListener('stateChanged', (e) => this.updateUI(e.detail)); window.addEventListener('swapLanguages', () => this.swapTextContent()); } render() { this.shadowRoot.innerHTML = `
Translation will appear here
Translation will appear here