import { c as i } from "../../chunks/runtime.js";
import { usePropertyChange as s } from "@arcgis/lumina/controllers";
import { reEmitEvent as a } from "@arcgis/lumina/controllers/accessor";
import o from "@geoscene/core/widgets/Features.js";
import { LitElement as r, createEvent as n, noShadowRoot as h } from "@arcgis/lumina";
import { m as d } from "../../chunks/useWidget.js";
import { css as l } from "@lit/reactive-element/css-tag.js";
import { c } from "../../chunks/createCloseEvent.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 g = l`@layer{geoscene-features{display:flex;flex-direction:column;overflow:hidden;.geoscene-features{flex:1 1 auto;overflow:hidden}}}`, u = d(o);
class w extends r {
  constructor() {
    super(...arguments), this.widget = u(this), this.viewModel = this.widget.viewModel, this.geosceneClose = c(this), this.actions = this.viewModel.actions, this.active = this.widget.active, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = this.widget.collapsed, this.content = this.widget.content, this.featureNavigationTop = this.widget.featureNavigationTop, this.featureViewModelAbilities = this.viewModel.featureViewModelAbilities, this.features = this.widget.features, this.featuresPerPage = this.viewModel.featuresPerPage, this.featuresTitle = this.widget.title, this.goToOverride = this.viewModel.goToOverride, this.headingLevel = this.widget.headingLevel, this.headerActions = this.widget.headerActions, this.hideActionBar = this.widget.visibleElements.actionBar, this.hideCloseButton = this.widget.visibleElements.closeButton, this.hideFeatureMenuHeading = this.widget.visibleElements.featureMenuHeading, this.hideFeatureNavigation = this.widget.visibleElements.featureNavigation, this.hideFlow = this.widget.visibleElements.flow, this.hideHeading = this.widget.visibleElements.heading, this.hideSpinner = this.widget.visibleElements.spinner, this.icon = this.widget.icon, this.includeDefaultActions = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.widget.initialDisplayMode, this.label = this.widget.label, this.map = this.widget.map, this.position = "bottom-left", this.promises = this.widget.promises, this.selectedFeature = this.widget.selectedFeature, this.selectedFeatureIndex = this.widget.selectedFeatureIndex, this.showCollapseButton = this.widget.visibleElements.collapseButton, this.spatialReference = this.widget.spatialReference, this.state = this.viewModel.state, this.timeZone = this.widget.timeZone, this.geoscenePropertyChange = s()("selectedFeature", "selectedFeatureIndex", "state"), this.geosceneReady = n(), this.geosceneTriggerAction = a(() => this.widget, "trigger-action");
  }
  static {
    this.properties = { actions: 0, active: 7, autoDestroyDisabled: 5, closed: 5, collapsed: 7, content: 1, featureNavigationTop: 5, featureViewModelAbilities: 0, features: 0, featuresPerPage: 9, featuresTitle: 1, goToOverride: 0, headingLevel: 9, headerActions: 0, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFlow: 5, hideHeading: 5, hideSpinner: 5, icon: 1, includeDefaultActions: 5, initialDisplayMode: 1, label: 1, map: 0, position: 1, promises: 0, referenceElement: 1, selectedFeature: 0, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 3, timeZone: 1 };
  }
  static {
    this.shadowRootOptions = h;
  }
  static {
    this.styles = g;
  }
  async clear() {
    this.widget?.clear();
  }
  async close() {
    this.widget?.close();
  }
  async destroy() {
    await this.manager.destroy();
  }
  async fetchFeatures(e, t) {
    return await this.widget?.fetchFeatures(e, t);
  }
  async next() {
    return this.widget?.next();
  }
  async open(e) {
    this.widget?.open(e);
  }
  async previous() {
    return this.widget?.previous();
  }
  async triggerAction(e) {
    this.widget?.triggerAction(e);
  }
}
i("geoscene-features", w);
export {
  w as GeosceneFeatures
};