import UI from "./ui"; class Panel extends UI { constructor(width, height) { super(document.createElement("div"), width, height); this._hidden = true; this.element.classList.add("shadow"); this.element.classList.add("hidden"); } toggle() { if (this._hidden) { this.show(); } else { this.hide(); } } show() { if (this._hidden) { this.element.classList.remove("hidden"); this._hidden = false; } } hide() { if (!this._hidden) { this.element.classList.add("hidden"); this._hidden = true; } } } export default Panel;