class CustomChatCard extends HTMLElement { static get observedAttributes() { return ['title', 'date', 'participants', 'preview', 'link']; } constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { this.render(); } attributeChangedCallback(name, oldValue, newValue) { this.render(); } render() { const title = this.getAttribute('title') || 'Untitled Chat'; const date = this.getAttribute('date') || 'No date'; const participants = this.getAttribute('participants') || '0'; const preview = this.getAttribute('preview') || 'No preview available'; const link = this.getAttribute('link') || '#'; this.shadowRoot.innerHTML = `