/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{property as s,subclass as t}from"../../../../core/accessorSupport/decorators.js";import r from"../../../Widget.js";import{css as o}from"./css.js";import{renderSpikeRamp as l}from"../support/sizeRampUtils.js";import{getTitle as i,attachToNode as n}from"../../support/styleUtils.js";import{tsx as m}from"../../../support/widget.js";let p=class extends r{constructor(e,s){super(e,s),this.legendElement=null}render(){const e=this.legendElement.infos.map(e=>this._renderRow(e)).filter(Boolean);return e.length?"spike"===this.legendElement.theme?l(this.legendElement):m("div",{class:o.layerBody},e):null}_renderRow(e){return e.preview?m("div",{class:o.layerRow,key:`${this.key}-${e.label}-row`},m("div",{class:this.classes(o.symbolContainer,o.sizeRamp)},m("div",{afterCreate:n,bind:e.preview,class:o.symbol})),m("div",{class:o.layerInfo},i(this.messages,e.label,!1)||"")):null}};e([s()],p.prototype,"legendElement",void 0),e([s()],p.prototype,"messages",void 0),p=e([t("esri.widgets.Legend.styles.classic.SizeRamp")],p);export{p as default};
