class CustomSidebar extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ` `; // Add event listener for upload button this.shadowRoot.getElementById('upload-btn').addEventListener('click', () => { const event = new CustomEvent('upload-clicked', { bubbles: true, composed: true }); this.dispatchEvent(event); }); } } customElements.define('custom-sidebar', CustomSidebar);