import { database } from "./database.js"; import { items_list } from "./items_list.js"; class chooser { #list; #store; #container; constructor(store, click) { if (!(store instanceof database)) { throw "Store must be instance of an database."; } if (typeof(click) !== "function") { throw "Click function must be an function instance."; } this.#container = document.createElement("div"); this.#container.className = "chooser"; this.#list = new items_list(this.#container, click); this.#list.update(store.content.submissions); } get ui() { return this.#container; } } export { chooser };