/*
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 e}from"tslib";import r from"../../../core/Error.js";import{property as i,subclass as t}from"../../../core/accessorSupport/decorators.js";import{canProjectWithoutEngine as a}from"../../../geometry/projectionUtils.js";import{isFeatureGraphicOrigin as o}from"../../../graphic/isFeatureGraphicOrigin.js";import{getEffectiveLayerCapabilities as s}from"../../../layers/support/layerUtils.js";import p from"./FeatureLayerViewBase3D.js";let n=class extends p{constructor(){super(...arguments),this.type="feature-3d"}initialize(){const{layer:e,view:i}=this;s(e)?.operations.supportsQuery||this.addResolvingPromise(Promise.reject(new r("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e}))),null!=e.infoFor3D&&this.addResolvingPromise(Promise.reject(new r("featurelayerview3d:unsupported-geometry-type",`Unsupported geometry type ${e.geometryType}`))),"mesh"!==e.geometryType||a(e.spatialReference,i.spatialReference)||this.addResolvingPromise(Promise.reject(new r("layerview:spatial-reference-incompatible","The spatial references of the feature layer is incompatible with the spatial reference of the view")))}get graphicOrigin(){const e=this.layer.graphicOrigin;if(!o(e))throw new r("featurelayerview3d:invalid-graphic-origin","Layer's graphic origin is not a FeatureGraphicOrigin");return e}get featureSpatialReference(){return this.view.featureTiles?.tilingScheme?.spatialReference}};e([i()],n.prototype,"layer",void 0),e([i()],n.prototype,"graphicOrigin",null),n=e([t("esri.views.3d.layers.FeatureLayerView3D")],n);const l=n;export{l as default};
