/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{substitute as t}from"../../../../intl.js";import{getTitle as e,isRendererTitle as r,getStretchStopLabel as i}from"../../support/styleUtils.js";function l(t,e,r){switch(e){case"heatmap-ramp":return r[t.label]||t.label;case"stretch-ramp":return i(t,r);default:return t.label}}function a(t,i){if(!t.title||"string"==typeof t.title)return t.title;const l="color-ramp"===t.type||"opacity-ramp"===t.type,a=t.title,n=e(i,a,l);return r(a,l)&&a.title?`${a.title} (${n})`:n}function n(t){return!(!t||"object"!=typeof t)}function o(r,i){const l=e(r,i,!1),a=l?r.previewTemplateAriaLabel:r.previewAriaLabel;return t(a,{label:l})}export{a as getLegendElementTitle,o as getPreviewAriaLabelIntl,l as getRampStopLabel,n as isWidthAndHeight};
