/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t,__param as o}from"tslib";import{location as r,option as e,input as i}from"../../GraphShaderModule.js";import{Vec3 as s,Vec4 as l,Float as p,Vec2 as a}from"../../graph/glsl.js";import{AFeatureShader as m,BaseHittestVertexInput as n,FeatureFragmentInput as u,FeatureVertexInput as h}from"./AFeatureShader.js";import{hittestFill as y}from"./hittestUtils.js";import{VisualVariableColor as c}from"./VisualVariableColor.js";import{VisualVariableOpacity as d}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as v,getVisualVariableColor as f}from"./vvUtils.js";class g extends h{}t([r(3,l)],g.prototype,"color",void 0),t([r(4,a)],g.prototype,"zoomRange",void 0);class x extends m{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,o){const r=v(this,t.id),e=f(this,t.id,t.color).multiply(r),i=this.view.displayViewScreenMat3.multiply(new s(t.pos.xy,1)),p=this.clip(t.id,t.zoomRange);return{glPosition:new l(i.xy,p,1),color:e,...this.maybeRunHittest(t,o,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new p(0))}hittest(t,o){return y(this,t,o)}}t([e(c)],x.prototype,"visualVariableColor",void 0),t([e(d)],x.prototype,"visualVariableOpacity",void 0),t([o(0,i(g)),o(1,i(n))],x.prototype,"vertex",null),t([o(0,i(u))],x.prototype,"fragment",null);export{x as FillShader,g as FillVertexInput};
