/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{OutlineFillMeshWriter as e,outlineFillVertexSpec_Fill as t,OutlineFillOutlineMeshWriter as r,outlineFillVertexSpec_Outline as s}from"./OutlineFillMeshWriter.js";import{patternFillVertexSpec as i}from"./PatternFillMeshWriter.js";const a={optionalAttributes:i.optionalAttributes,createComputedParams:e=>e,attributes:{...i.attributes,...t.attributes}},u={optionalAttributes:i.optionalAttributes,createComputedParams:e=>e,attributes:{...i.attributes,...s.attributes}};class n extends r{constructor(){super(...arguments),this.vertexSpec=u}}class o extends e{constructor(){super(...arguments),this.vertexSpec=a}_createOutlineWriter(e,t,r,s){return new n(e,t,r,s)}write(e,t,r,s,i){this.ensurePacked(t,r,s);const a=this.evaluatedMeshParams.sprite?.textureBinding;e.recordStart(this.instanceId,this.attributeLayout,a),this._write(e,{target:r,options:s,level:i}),e.recordEnd()}ensurePacked(e,t,r){super.ensurePacked(e,t,r),this._lineMeshWriter.ensurePacked(e,t,r)}enqueueRequest(e,t,r){super.enqueueRequest(e,t,r),this._lineMeshWriter.enqueueRequest(e,t,r)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}}export{o as PatternOutlineFillMeshWriter};
