class AppSidebar extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ` `; // Initialize feather icons in shadow DOM setTimeout(() => { if (window.feather) { window.feather.replace({ class: 'feather' }); } }, 100); // Add click handlers for nav links this.shadowRoot.querySelectorAll('.nav-link').forEach(link => { link.addEventListener('click', (e) => { this.shadowRoot.querySelectorAll('.nav-link').forEach(l => l.classList.remove('active')); e.currentTarget.classList.add('active'); }); }); } } customElements.define('app-sidebar', AppSidebar);