/* ===================== AUTOGENERATED SOURCE IMPORT ===================== */

import GlobalStyle from "/emcJS/util/html/template/CSSTemplate.js";

const STYLE = new GlobalStyle(`
    :host {
        overflow: hidden;
    }
`);

/* ======================================================================= */

import CustomElement from "../element/CustomElement.js";
// import TPL from "./Panel.js.html" assert {type: "html"};

const REG = new Map();

export default class Panel extends CustomElement {

    constructor() {
        super();
        // this.shadowRoot.append(TPL.generate());
        STYLE.apply(this.shadowRoot);
        /* --- */
        if (new.target === Panel) {
            throw new Error("can not construct abstract class");
        }
    }

    static registerReference(ref, clazz) {
        if (!(clazz.prototype instanceof Panel)) {
            throw new Error("registered class must extend the Panel class");
        }
        REG.set(ref, clazz);
    }

    static getReference(ref) {
        if (REG.has(ref)) {
            return REG.get(ref);
        }
    }

}
