/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as s,isHittest as t,getFeatureUniforms as r,resolveDynamicUniforms as a,getFeaturePipelineState as i}from"../featureTechniqueUtils.js";import{TextShader as n}from"./TextShader.js";class o extends e{constructor(){super(...arguments),this.type=31,this.shaders={geometry:new n},this.symbologyPlane=3}render(e,n){const{painter:o}=e,u=s(e),d=n.instance.getInput(),m={shader:this.shaders.geometry,uniforms:{...a(e,n.target,d.uniforms),...r(e,n.target),mosaicInfo:o.textureManager.getMosaicInfo(e,n.textureKey)},defines:{...u,isBackgroundPass:!0,isLabel:!1,textRenderPassType:0},optionalAttributes:d.optionalAttributes,useComputeBuffer:t(e)};o.setShader(m),o.setPipelineState(i(e)),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:2}}),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:1}}),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:0}}),o.submitDraw(e,n)}}export{o as TextTechnique};
