class NavItem extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { const icon = this.getAttribute('icon') || 'circle'; const label = this.getAttribute('label') || 'Item'; const active = this.hasAttribute('active'); this.shadowRoot.innerHTML = ` `; // Replace feather icons after rendering setTimeout(() => { if (window.feather) { window.feather.replace({ width: '1rem', height: '1rem' }); } }, 100); } } customElements.define('nav-item', NavItem);