class AdminHeader extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
`; // Add logout functionality this.shadowRoot.getElementById('logoutBtn').addEventListener('click', () => { localStorage.removeItem('authToken'); window.location.href = '/login.html'; }); } } customElements.define('admin-header', AdminHeader);