import { c as l } from "../../chunks/runtime.js";
import { css as o, html as r } from "lit";
import { LitElement as d } from "@arcgis/lumina";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
v4.34.7 */
const c = o`:host{display:flex;flex-direction:column;gap:var(--calcite-spacing-xxs)}`;
class p extends d {
  constructor() {
    super(...arguments), this._expandedLine = void 0, this.featureSelected = !1;
  }
  static {
    this.properties = { _expandedLine: 16, effectiveDisplayUnits: 0, featureSelected: 5, messages: 0, results: 0 };
  }
  static {
    this.styles = c;
  }
  async destroy() {
    await this.manager.destroy();
  }
  _onToggleExpand(t) {
    const e = t.detail;
    this._expandedLine = e === this._expandedLine ? void 0 : e;
  }
  render() {
    const { messages: t, effectiveDisplayUnits: e, _expandedLine: n } = this, s = this.results ?? [], a = s.length <= 1;
    return s.map((i) => r`<arcgis-elevation-profile-legend-item .effectiveDisplayUnits=${e} .expanded=${i.profile === n} .featureSelected=${this.featureSelected} .hideCheckbox=${a} .messages=${t} @arcgisExpandedToggle=${this._onToggleExpand} .result=${i}></arcgis-elevation-profile-legend-item>`);
  }
}
l("arcgis-elevation-profile-legend", p);
export {
  p as ArcgisElevationProfileLegend
};
