/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../geometry/SpatialReference","../DataModel","../DocumentEntityTypeInfo","../EntityType","../FieldIndex","../GraphObjectType","../GraphProperty","../RelationshipType","./WasmDataModelWrapperInterfaces"],(function(e,t,i,n,r,a,o,s,l,p){"use strict";function d(e){return e.deleteLater(),new i({timestamp:e.timestamp,spatialReference:new t(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,originEntityGlobalIdField:e.origin_entity_globalid_property,destEntityGlobalIdField:e.dest_entity_globalid_property,documentEntityTypeInfo:y(e.document_entity_type_info),entityTypes:b(e.entity_types),relationshipTypes:I(e.relationship_types)})}function y(e){return e.deleteLater(),new n({nameField:e.name,titleField:e.title_property,urlField:e.url_property,textField:e.text_property,keywordsField:e.keywords_property,contentTypeField:e.content_type_property,metadataField:e.metadata_property,fileExtensionField:e.file_extension_property})}function u(e){return e.deleteLater(),new r(_(e))}function c(e){return e.deleteLater(),new a({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:h(e.fields)})}function f(e){return e.deleteLater(),new o(_(e))}function _(e){return{name:e.name,alias:e.alias,role:p.NamedObjectTypes[e.role.value]?p.NamedObjectTypes[e.role.value]:null,strict:e.strict,properties:w(e.properties),fieldIndexes:F(e.field_indexes)}}function m(e){return e.deleteLater(),new s({alias:e.alias,name:e.name,fieldType:p.EsriFieldTypes[e.field_type.value]?p.EsriFieldTypes[e.field_type.value]:null,geometryType:p.EsriGeometryTypes[e.geometry_type.value]?p.EsriGeometryTypes[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibiilty:e.default_visibility,systemMaintained:e.system_maintained,searchable:e.searchable,defaultValue:e.default_value})}function T(e){e.deleteLater();const t=_(e);return new l(Object.assign({strictOrigin:e.strict_origin,strictDestination:e.strict_destination,originEntityTypes:E(e.origin_entity_types),destinationEntityTypes:g(e.destination_entity_types)},t))}function g(e){const t=[];for(let i=0;i<e.size();i++)t.push(e.get(i));return t}function b(e){const t=[];for(let i=0;i<e.size();i++)t.push(u(e.get(i)));return t}function h(e){const t=[];for(let i=0;i<e.size();i++)t.push(e.get(i));return t}function w(e){const t=[];for(let i=0;i<e.size();i++)t.push(m(e.get(i)));return t}function F(e){const t=[];for(let i=0;i<e.size();i++)t.push(c(e.get(i)));return t}function E(e){const t=[];for(let i=0;i<e.size();i++)t.push(e.get(i));return t}function I(e){const t=[];for(let i=0;i<e.size();i++)t.push(T(e.get(i)));return t}e.wasmToDataModel=d,e.wasmToDocumentEntityTypeInfo=y,e.wasmToEntityType=u,e.wasmToFieldIndex=c,e.wasmToGraphObjectType=f,e.wasmToGraphProperty=m,e.wasmToRelationshipType=T,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
