import { c as e } from "../../chunks/runtime.js";
import { usePropertyChange as t } from "@arcgis/lumina/controllers";
import i from "@geoscene/core/widgets/Legend.js";
import { LitElement as s, createEvent as r, noShadowRoot as a } from "@arcgis/lumina";
import { m as o } from "../../chunks/useWidget.js";
import { css as n } from "@lit/reactive-element/css-tag.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 l = n`@layer{geoscene-legend{display:block}}`, d = o(i);
class h extends s {
  constructor() {
    super(...arguments), this.widget = d(this), this.viewModel = this.widget.viewModel, this.activeLayerInfos = this.widget.activeLayerInfos, this.autoDestroyDisabled = !1, this.basemapLegendVisible = this.widget.basemapLegendVisible, this.headingLevel = this.widget.headingLevel, this.hideLayersNotInCurrentView = this.widget.hideLayersNotInCurrentView, this.icon = this.widget.icon, this.label = this.widget.label, this.layerInfos = this.widget.layerInfos, this.legendStyle = this.widget.style, this.position = "bottom-left", this.respectLayerDefinitionExpression = this.widget.respectLayerDefinitionExpression, this.respectLayerVisibilityDisabled = this.widget.respectLayerVisibility, this.state = this.viewModel.state, this.geoscenePropertyChange = t()("state"), this.geosceneReady = r();
  }
  static {
    this.properties = { activeLayerInfos: 0, autoDestroyDisabled: 5, basemapLegendVisible: 5, headingLevel: 9, hideLayersNotInCurrentView: 5, icon: 1, label: 1, layerInfos: 0, legendStyle: 1, position: 1, referenceElement: 1, respectLayerDefinitionExpression: 5, respectLayerVisibilityDisabled: 5, state: 3 };
  }
  static {
    this.shadowRootOptions = a;
  }
  static {
    this.styles = l;
  }
  async destroy() {
    await this.manager.destroy();
  }
}
e("geoscene-legend", h);
export {
  h as GeosceneLegend
};