class CustomProblemCard extends HTMLElement { constructor() { super(); this.title = this.getAttribute('title') || 'Challenge'; this.language = this.getAttribute('language') || 'Python'; this.difficulty = this.getAttribute('difficulty') || 'Easy'; this.time = this.getAttribute('time') || '15 min'; this.description = this.getAttribute('description') || 'Description'; this.status = this.getAttribute('status') || 'free'; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
${this.status !== 'free' ? `
${this.status.toUpperCase()}
` : ''}
${this.language}

${this.title}

${this.description}

${this.difficulty}
${this.time}
`; setTimeout(() => { if (typeof feather !== 'undefined') { feather.replace(); } }, 100); } } customElements.define('custom-problem-card', CustomProblemCard);