/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import e from"../../../../../../geometry/SpatialReference.js";import{getJsonType as t}from"../../../../../../geometry/support/jsonTypeUtils.js";import r from"../../../../../../layers/support/FieldsIndex.js";import{MeshData as o}from"../../mesh/MeshData.js";import{createMeshWriter as s}from"./createMeshWriter.js";import{AResourceProxy as n}from"./mesh/AResourceProxy.js";import{ComputedAttributeStorage as m}from"../../../../layers/features/support/ComputedAttributeStorage.js";import{FeatureMetadata as a}from"../../../../layers/features/support/FeatureMetadata.js";import{FeatureSetReaderJSON as i}from"../../../../layers/features/support/FeatureSetReaderJSON.js";async function u(n){const u=new o("0.0.0.0"),d=new p,l={},c={fields:new r,spatialReference:e.WebMercator},f={$view:{scale:0,timeZone:null,timeProperties:{currentStart:null,currentEnd:null}}},h=new m(c);for(const e of n){const r=await s(h,d,l,e.instanceId,e.meshParams,e.meshWriterClass);e.feature.displayId=e.feature.attributes.objectId;const o=i.fromFeatures([e.feature],a.minimal(t(e.feature.geometry),"objectId",[]));o.next(),u.entityStart(o.getDisplayId(),0),r.write(u,d,o,f,0,null),u.entityEnd()}return u.serialize().message}class p extends n{fetchMeshResourceImmediate(e){throw new Error("Method not implemented.")}fetchDictionaryResourceImmediate(e){throw new Error("Method not implemented.")}fetchResourceImmediate(e){throw new Error("Method not implemented.")}enqueueRequest(e){throw new Error("Method not implemented.")}fetchEnqueuedResources(){throw new Error("Method not implemented.")}getResource(e){throw new Error("Method not implemented.")}}export{u as createTestMeshData};
