import { c as e } from "../../chunks/runtime.js";
import { usePropertyChange as i } from "@arcgis/lumina/controllers";
import { reEmitEvent as t } from "@arcgis/lumina/controllers/accessor";
import s from "@geoscene/core/widgets/UtilityNetworkTrace.js";
import { LitElement as r, createEvent as a, noShadowRoot as o } from "@arcgis/lumina";
import { m as l } from "../../chunks/useWidget.js";
/*! 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 */
const d = l(s);
class h extends r {
  constructor() {
    super(...arguments), this.widget = d(this), this.viewModel = this.widget.viewModel, this.autoDestroyDisabled = !1, this.defaultGraphicColor = this.widget.defaultGraphicColor, this.disabled = this.widget.disabled, this.enableResultArea = this.widget.enableResultArea, this.flags = this.widget.flags, this.gdbVersion = this.widget.gdbVersion, this.icon = this.widget.icon, this.inputSettings = this.widget.inputSettings, this.label = this.widget.label, this.position = "top-right", this.resultAreaProperties = this.widget.resultAreaProperties, this.selectOnCompleteDisabled = this.widget.selectOnComplete, this.selectedTraces = this.widget.selectedTraces, this.showGraphicsOnCompleteDisabled = this.widget.showGraphicsOnComplete, this.showSelectionAttributesDisabled = this.widget.showSelectionAttributes, this.state = this.viewModel.state, this.geosceneAddFlag = t(() => this.widget, "add-flag"), this.geosceneAddFlagComplete = t(() => this.widget, "add-flag-complete"), this.geosceneAddFlagError = t(() => this.widget, "add-flag-error"), this.geosceneAddResultArea = t(() => this.widget, "add-result-area"), this.geoscenePropertyChange = i()("state"), this.geosceneReady = a(), this.geosceneRemoveResultArea = t(() => this.widget, "remove-result-area");
  }
  static {
    this.properties = { autoDestroyDisabled: 5, defaultGraphicColor: 0, disabled: 7, enableResultArea: 5, flags: 0, gdbVersion: 1, icon: 1, inputSettings: 0, label: 1, position: 1, referenceElement: 1, resultAreaProperties: 0, selectOnCompleteDisabled: 5, selectedTraces: 0, showGraphicsOnCompleteDisabled: 5, showSelectionAttributesDisabled: 5, state: 3 };
  }
  static {
    this.shadowRootOptions = o;
  }
  async checkCanTrace() {
    await this.widget?.checkCanTrace();
  }
  async confirmReset() {
    this.widget?.confirmReset();
  }
  async destroy() {
    await this.manager.destroy();
  }
}
e("geoscene-utility-network-trace", h);
export {
  h as GeosceneUtilityNetworkTrace
};