/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import { c as o } from "../../chunks/runtime.js";
import { html as n } from "lit";
import { watch as a } from "@arcgis/core/core/reactiveUtils.js";
import { LitElement as u } from "@arcgis/lumina";
class p extends u {
  static {
    this.properties = { viewModel: 0 };
  }
  loaded() {
    this.manager.onLifecycle(() => [
      a(() => this.viewModel.templateOptions.customTextElements, () => this.requestUpdate(), { initial: !0 })
    ]);
  }
  render() {
    const e = this.viewModel.templateOptions.customTextElements;
    return e ? n`<div>${e.map((l) => {
      const [t, r] = Object.entries(l)[0];
      return t === "date" ? null : n`<calcite-label>${t}<calcite-input .value=${r ?? ""} @calciteInputInput=${(s) => {
        const i = e.find((m) => {
          const [c] = Object.entries(m)[0];
          return c === t;
        });
        i && (i[t] = s.target.value);
      }}></calcite-input></calcite-label>`;
    })}</div>` : null;
  }
}
o("arcgis-print-custom-text-elements", p);
export {
  p as PrintCustomTextElements
};
