class CustomDocumentCard extends HTMLElement { connectedCallback() { const document = JSON.parse(this.getAttribute('document')); const onClick = this.getAttribute('onClick'); const onSign = this.getAttribute('onSign'); const onDelete = this.getAttribute('onDelete'); const onShare = this.getAttribute('onShare'); this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
${document.name}
${document.status === 'pending' ? `
Pending
` : ''} ${document.status === 'signed' ? `
Signed
` : ''}
${document.type === 'pdf' ? ` ` : ` `}

${document.name}

${document.size} • ${document.lastModified}

`; // Initialize feather icons feather.replace(); } } customElements.define('custom-document-card', CustomDocumentCard);