import {TesoftComponent} from "../scripts/main.ts";

export class TesoftBadge extends TesoftComponent {
    constructor() {
        super();

        const template = document.getElementById("tesoft-badge-template") as HTMLTemplateElement;
        const templateContent = template.content;

        const shadowRoot = this.attachShadow({mode: "open"});
        shadowRoot.appendChild(templateContent.cloneNode(true));
    }

    set gold(value: string | null) {
        if (value === null) {
            this.removeAttribute("gold")
        } else {
            this.setAttribute("gold", "")
        }
    }
}

customElements.define("tesoft-badge", TesoftBadge);
