/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import a from"./3AEP2FXT.js";import{O as i,P as c,Q as o,U as p,a as s,b as l}from"./IXZEUVT2.js";import"./H6RQVSYM.js";export default $arcgis.t(([{c:n,h:m}])=>{var d=s`.layer-row{display:flex}.layer-cell{padding:var(--calcite-spacing-xxs) 0;vertical-align:middle;word-break:break-word}.layer-cell-symbols{text-align:center}.layer-cell-info{padding-right:var(--calcite-spacing-sm);padding-left:var(--calcite-spacing-sm);max-width:250px;word-break:normal;word-wrap:normal;font-size:var(--calcite-font-size-sm)}.ramps{margin-left:var(--calcite-spacing-sm)}:dir(rtl) .ramps{margin-right:var(--calcite-spacing-sm);margin-left:auto}.color-ramp{width:24px}.opacity-ramp{background-image:url(data:image/avif;base64,AAAAHGZ0eXBhdmlmAAAAAG1pZjFhdmlmbWlhZgAAANZtZXRhAAAAAAAAACFoZGxyAAAAAAAAAABwaWN0AAAAAAAAAAAAAAAAAAAAAA5waXRtAAAAAAABAAAAImlsb2MAAAAAREAAAQABAAAAAAD6AAEAAAAAAAAAHgAAACNpaW5mAAAAAAABAAAAFWluZmUCAAAAAAEAAGF2MDEAAAAAVmlwcnAAAAA4aXBjbwAAAAxhdjFDgQAMAAAAABRpc3BlAAAAAAAAAAgAAAAIAAAAEHBpeGkAAAAAAwgICAAAABZpcG1hAAAAAAAAAAEAAQOBAgMAAAAmbWRhdBIACggYCL/kgIaDQjIQGAAAAEBAA1LuL7oS8L0QEA==)}.ramp-labels{display:flex;flex-flow:column nowrap;justify-content:space-between}.ramp-label{position:relative;padding:0 var(--calcite-spacing-sm);line-height:var(--calcite-font-size-sm);white-space:nowrap;font-size:var(--calcite-font-size-sm)}.ramp-label:before{display:block;position:absolute;top:.25em;right:100%;border-width:3px 4px 3px 0;border-style:solid;border-color:transparent var(--calcite-color-text-1) transparent transparent;width:0;height:0;content:""}.ramp-label:first-child{margin-top:calc(var(--calcite-font-size-sm) / 3 * -1)}.ramp-label:last-child{bottom:calc(var(--calcite-font-size-sm) * .25 * -1)}.layer-caption{display:table-caption;padding:var(--calcite-spacing-sm) 0}:dir(rtl) .ramp-label:before{right:auto;left:100%;border-width:3px 0 3px 4px;border-color:transparent transparent transparent var(--calcite-color-text-1)}`,r=class extends i{constructor(){super(...arguments),this.legendElement=null,this.opacity=1}static{this.properties={_preview:16,legendElement:0,opacity:9,messages:0}}static{this.styles=d}get _preview(){let A=this.legendElement.preview;if(!A)return null;let a=this.legendElement.type==="opacity-ramp",e=a?"opacity-ramp":"";A.className=`color-ramp ${e}`,this.opacity!=null&&(A.style.opacity=this.opacity.toString());let t=a?this.messages.previewOpacityRampAriaLabel:this.messages.previewColorRampAriaLabel;return m(A,t),A}render(){let{legendElement:A,_preview:a}=this;if(!a)return null;let e={height:a.style.height};return l`<div class="layer-row"><div class="layer-cell layer-cell-symbols"><div class="ramps">${a}</div></div><div class="layer-cell layer-cell-info"><div class="ramp-labels" style=${o(e)}>${A.infos.map(t=>this._renderRampLabel(t,A.type))}</div></div></div>`}_renderRampLabel(A,a){return l`<div class=${c(A.label?"ramp-label":void 0)}>${n(A,a,this.messages)}</div>`}};p("arcgis-legend-classic-color-ramp",r);return r},a)