/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import e from"../../core/Logger.js";import r from"../ClassBreaksRenderer.js";import t from"../DictionaryRenderer.js";import s from"../DotDensityRenderer.js";import o from"../HeatmapRenderer.js";import n from"../PieChartRenderer.js";import i from"../Renderer.js";import a from"../SimpleRenderer.js";import l from"../UniqueValueRenderer.js";const m={key:"type",base:i,typeMap:{heatmap:o,simple:a,"unique-value":l,"class-breaks":r,"dot-density":s,dictionary:t,"pie-chart":n},errorContext:"renderer"},u={key:"type",base:i,typeMap:{simple:a,"unique-value":l,"class-breaks":r,heatmap:o},errorContext:"renderer",validate:c};function p(e){return e instanceof i}function c(e){switch(e.type){case"simple":return f(e);case"unique-value":return d(e);case"class-breaks":return y(e);case"heatmap":return e}}function f(r){if(r.symbol)return r;e.getLogger("esri.renderers.support.types").error("Removed invalid 'simple' renderer without a symbol from web scene.")}function d(r){const t=r.uniqueValueInfos,s=t?.filter(({symbol:r,label:t},s)=>(r||e.getLogger("esri.renderers.support.types").error(`Removed invalid unique value info ([${s}] ${t}) without a symbol from web scene.`),!!r));return s?.length!==t?.length&&(r.uniqueValueInfos=s),r}function y(r){const t=r.classBreakInfos,s=t?.filter(({symbol:r,label:t},s)=>(r||e.getLogger("esri.renderers.support.types").error(`Removed invalid class break info ([${s}] ${t}) without a symbol from web scene.`),!!r));return s?.length!==t?.length&&(r.classBreakInfos=s),r}export{p as isRenderer,m as rendererTypes,u as webSceneRendererTypes};
