import { c as a } from "../../chunks/runtime.js";
import { html as n } from "lit-html";
import { watch as c } from "@geoscene/core/core/reactiveUtils.js";
import { LitElement as u, noShadowRoot as p } from "@arcgis/lumina";
/*! All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
See https://js.geoscene.cn/4.33/geoscene/copyright.txt for details.
v4.33.18 */
class d extends u {
  static {
    this.properties = { viewModel: 0 };
  }
  static {
    this.shadowRootOptions = p;
  }
  loaded() {
    this.manager.onLifecycle(() => [
      c(() => this.viewModel.templateOptions.customTextElements, () => this.requestUpdate(), { initial: !0 })
    ]);
  }
  render() {
    const e = this.viewModel.templateOptions.customTextElements;
    return e ? n`<div>${e.map((l) => {
      const [t, s] = Object.entries(l)[0];
      return t === "date" ? null : n`<calcite-label>${t}<calcite-input .value=${s ?? ""} @calciteInputInput=${(o) => {
        const i = e.find((r) => {
          const [m] = Object.entries(r)[0];
          return m === t;
        });
        i && (i[t] = o.target.value);
      }}></calcite-input></calcite-label>`;
    })}</div>` : null;
  }
}
a("geoscene-print-custom-text-elements", d);
export {
  d as PrintCustomTextElements
};