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

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

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

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

    reset() {
        this.removeAttribute("loaded");
    }

    finish() {
        this.setAttribute("loaded", "");
    }
}

customElements.define("tesoft-loader-section", TesoftLoaderSection);
