/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["require","exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../chunks/tslib.es6","../core/shaderTechnique/ReloadableShaderModule","../core/shaderTechnique/ShaderTechnique","../core/shaderTechnique/ShaderTechniqueConfiguration","../lib/basicInterfaces","../lib/DefaultVertexAttributeLocations","../lib/OrderIndependentTransparency","../lib/Program","../materials/DefaultTechniqueConfiguration","../../../../chunks/MeasurementArrow.glsl","../../../webgl/enums","../../../webgl/renderState"],(function(e,r,t,n,a,i,o,s,u,l,c,p,d,f,h){"use strict";let g=function(e){function r(r,t,n){return e.call(this,r,t,n)||this}t._inheritsLoose(r,e);var n=r.prototype;return n.initializeProgram=function(e){const t=r.shader.get().build(this.configuration);return new c.Program(e.rctx,t,u.Default3D)},n._setPipelineState=function(e){const r=e===s.TransparencyPassType.NONE,t=this.configuration;return h.makePipelineState({blending:t.transparent?r?l.blendingDefault:l.oitBlending(e):null,polygonOffset:this.configuration.polygonOffsetEnabled&&{factor:0,units:-4},depthTest:{func:f.CompareFunction.LESS},depthWrite:h.defaultDepthWriteParams,colorWrite:h.defaultColorWriteParams})},n.initializePipeline=function(){return this._setPipelineState(this.configuration.transparencyPassType)},t._createClass(r,[{key:"primitiveType",get:function(){return f.PrimitiveType.TRIANGLE_STRIP}}]),r}(i.ShaderTechnique);g.shader=new a.ReloadableShaderModule(d.MeasurementArrow,(()=>new Promise(((r,t)=>e(["./MeasurementArrow.glsl"],r,t)))));let T=function(e){function r(){var r;return(r=e.apply(this,arguments)||this).polygonOffsetEnabled=!1,r.transparent=!1,r.transparencyPassType=s.TransparencyPassType.NONE,r}return t._inheritsLoose(r,e),r}(p.DefaultTechniqueConfiguration);n.__decorate([o.parameter()],T.prototype,"polygonOffsetEnabled",void 0),n.__decorate([o.parameter()],T.prototype,"transparent",void 0),n.__decorate([o.parameter({count:s.TransparencyPassType.COUNT})],T.prototype,"transparencyPassType",void 0),r.MeasurementArrowTechnique=g,r.MeasurementArrowTechniqueConfiguration=T,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
