/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../core/has","../../core/Error","../../core/maybe","../../symbols/support/symbolConversion"],(function(e,r,n,t,o){"use strict";function s(e){return t.isNone(e)||"simple"===e.type||"unique-value"===e.type||"class-breaks"===e.type||"dictionary"===e.type||"heatmap"===e.type}function u(e){if(t.isNone(e))return null;if(!s(e))return new n("renderer-conversion-3d:unsupported-renderer",`Unsupported renderer of type '${e.type||e.declaredClass}'`,{renderer:e});switch(e.type){case"simple":return i(e);case"unique-value":return a(e);case"class-breaks":return c(e);case"dictionary":case"heatmap":return null}return null}function l(e,r){if(!r)return null;let t;if(t=Array.isArray(r)?r:[r],t.length>0){const r=t.map((e=>e.details.symbol.type||e.details.symbol.declaredClass)).filter((e=>!!e));r.sort();const o=[];return r.forEach(((e,n)=>{0!==n&&e===r[n-1]||o.push(e)})),new n("renderer-conversion-3d:unsupported-symbols",`Renderer contains symbols (${o.join(", ")}) which are not supported in 3D`,{renderer:e,symbolErrors:t})}return null}function i(e){return l(e,o.to3D(e.symbol).error)}function a(e){const r=e.uniqueValueInfos.map((e=>o.to3D(e.symbol).error)).filter((e=>!!e)),n=o.to3D(e.defaultSymbol);return n.error&&r.unshift(n.error),l(e,r)}function c(e){const r=e.classBreakInfos.map((e=>o.to3D(e.symbol).error)).filter((e=>!!e)),n=o.to3D(e.defaultSymbol);return n.error&&r.unshift(n.error),l(e,r)}e.isSupportedRenderer3D=s,e.validateTo3D=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
