/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getFeatureUniforms as i,getSelectionDefines as s,resolveDynamicUniforms as r,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{PieChartShader as h}from"./PieChartShader.js";class u extends e{constructor(){super(...arguments),this.type=29,this.shaders={geometry:new h},this.symbologyPlane=2}render(e,h){const{painter:u}=e,{instance:o,target:n}=h,l=this.shaders.geometry,m=o.getInput(),f=m.uniforms.numberOfFields,S=t(e),V=i(e,n),d=s(e);l.setNumberOfFields(f),u.setShader({shader:l,uniforms:{...r(e,h.target,m.uniforms.shader),...V.storage,...V.view,...V.highlight,highlightUniforms:V.highlight,hittestUniforms:V.hittestRequest?{hittestDist:V.hittestRequest?.distance,hittestPos:V.hittestRequest?.position}:null},defines:{VV_SIZE_MIN_MAX_VALUE:!!m.uniforms.shader.visualVariableSizeMinMaxValue,VV_SIZE_SCALE_STOPS:!!m.uniforms.shader.visualVariableSizeScaleStops,VV_SIZE_FIELD_STOPS:!!m.uniforms.shader.visualVariableSizeStops,VV_SIZE_UNIT_VALUE:!!m.uniforms.shader.visualVariableSizeUnitValue,VV_OPACITY:!!m.uniforms.shader.visualVariableOpacity,HITTEST:S,highlight:V.highlight?1:0,...d,numberOfFields:f},optionalAttributes:{},useComputeBuffer:S}),u.setPipelineState(a(e)),u.submitDraw(e,h)}}export{u as PieChartTechnique};
