/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../../chunks/_rollupPluginBabelHelpers","../../../chunks/tslib.es6","../../../core/Error","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/subclass","../../../geometry/projection","../../../support/featureFlags","./FeatureLayerViewBase3D"],(function(e,r,t,i,a,s,o,l,c,p,n){"use strict";let y=function(r){function i(){var e;return(e=r.apply(this,arguments)||this).type="feature-3d",e.direct3DObjectFeatureLayerDisplayEnabled=p.enableDirect3DObjectFeatureLayerDisplay(),e}return e._inheritsLoose(i,r),i.prototype.initialize=function(){"capabilities"in this.layer&&this.layer.capabilities.operations.supportsQuery||this.addResolvingPromise(Promise.reject(new t("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:this.layer}))),this.layer.infoFor3D&&!this.direct3DObjectFeatureLayerDisplayEnabled&&this.addResolvingPromise(Promise.reject(new t("featurelayerview3d:unsupported-geometry-type",`Unsupported geometry type ${this.layer.geometryType}`))),"mesh"!==this.layer.geometryType||c.canProjectWithoutEngine(this.layer.spatialReference,this.view.spatialReference)||this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The spatial references of the feature layer is incompatible with the spatial reference of the view")))},e._createClass(i,[{key:"featureSpatialReference",get:function(){var e,r;return null==(e=this.view.featureTiles)||null==(r=e.tilingScheme)?void 0:r.spatialReference}}]),i}(n);r.__decorate([i.property({constructOnly:!0})],y.prototype,"direct3DObjectFeatureLayerDisplayEnabled",void 0),r.__decorate([i.property()],y.prototype,"layer",void 0),y=r.__decorate([l.subclass("esri.views.3d.layers.FeatureLayerView3D")],y);return y}));
