/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as e}from"tslib";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import t from"../../Widget.js";import{legendCss as i}from"../css.js";import{LegendItem as n}from"./LegendItem.js";import{tsx as r}from"../../support/widget.js";let p=class extends t{constructor(){super(...arguments),this._expandedLine=null}render(){const{profiles:e,messages:o,effectiveUnits:s,_expandedLine:t}=this;return r("div",{class:i.base},e.map(i=>r(n,{checkboxVisible:e.length>1,effectiveUnits:s,expanded:i===t,line:i,messages:o,onExpandedToggle:()=>this._onExpandedToggle(i)})))}_onExpandedToggle(e){this._expandedLine=e===this._expandedLine?null:e}};e([o()],p.prototype,"effectiveUnits",void 0),e([o()],p.prototype,"messages",void 0),e([o()],p.prototype,"profiles",void 0),e([o()],p.prototype,"_expandedLine",void 0),p=e([s("esri.widgets.ElevationProfile.components.Legend")],p);export{p as Legend};
