import{__decorate as e}from"tslib";import{serializable as r}from"../support/Serializable.js";import{isIntegratedMeshLayer as t}from"../utilities/_layers.js";import{LayerExtension as a,LayerExtensionSchema as s}from"./_LayerExtension.js";let n=class extends a{get layer(){return super.layer}get canChangeOpacity(){return!1}_getSerializableProperties(){const e=super._getSerializableProperties();return{...e,layer:{...this._toPropertyDef(e.layer),default:{layerType:"IntegratedMeshLayer"}}}}_isSupportedLayer(e){return t(e)}_createSchema(){return new o(this)}async _applyPortalItemProperties(e){if("Scene Service"!==e.type)throw new Error(`Cannot create Integrated Mesh Layer from Portal item that has type: ${e.type}`);if(!e.typeKeywords.includes("IntegratedMesh"))throw new Error("Cannot create Integrated Mesh Layer from Portal item that does not reference an Integrated Mesh layer");this.layer.url=e.url||this.layer.url}};n=e([r],n);export{n as IntegratedMeshLayerExtension};let o=class extends s{_getPropertyBindings(){return{spatialReference:{property:"spatialReference",readonly:!0}}}};o=e([r],o);