import DropdownTemplate from "../template/pin/DropdownTemplate.js" import IElement from "./IElement.js" /** @extends {IElement} */ export default class DropdownElement extends IElement { static properties = { ...super.properties, options: { type: Object, }, selectedOption: { type: String, }, } constructor() { super() super.initialize({}, new DropdownTemplate()) this.options = /** @type {[String, String][]} */([]) this.selectedOption = "" } /** @param {[String, String][]} options */ static newObject(options) { const result = new DropdownElement() return result } initialize() { // Initialized in the constructor, this method does nothing } getValue() { return this.template.getSelectedValue() } }