class SupportTicket extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
🎟️

Create Support Ticket

`; const form = this.shadowRoot.getElementById('supportForm'); const ticketForm = this.shadowRoot.getElementById('ticketForm'); const confirmation = this.shadowRoot.getElementById('confirmation'); const newTicketBtn = this.shadowRoot.getElementById('newTicketBtn'); form.addEventListener('submit', (e) => { e.preventDefault(); // In a real app, you would send the form data to your backend ticketForm.classList.add('hidden'); confirmation.classList.remove('hidden'); }); newTicketBtn.addEventListener('click', () => { form.reset(); confirmation.classList.add('hidden'); ticketForm.classList.remove('hidden'); }); } } customElements.define('support-ticket', SupportTicket);