import { html } from "lit" import Configuration from "../Configuration" import LinearColorEntity from "../entity/LinearColorEntity" import WindowTemplate from "./WindowTemplate" /** @typedef {import("../element/WindowElement").default} WindowElement */ export default class ColorPickerWindowTemplate extends WindowTemplate { static windowName = html`Color Picker` /** @type {LinearColorEntity} */ #color get color() { return this.#color } /** @param {LinearColorEntity} value */ set color(value) { if (value.num() == this.color.num()) { this.element.requestUpdate("color", this.#color) this.#color = value } } connectedCallback() { super.connectedCallback() this.color = this.element.windowOptions.getPinColor() } /** @param {Map} changedProperties */ firstUpdated(changedProperties) { } renderContent() { const rgba = this.color.rgba() return html`