/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import{makeHandle as o}from"../../../core/handleUtils.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{whenOnce as s}from"../../../core/reactiveUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import{supportsHeightModelInfo as l,rejectLayerError as n}from"../../../geometry/support/heightModelInfoUtils.js";const a=a=>{const p=a;let d=class extends p{constructor(){super(...arguments),this.slicePlaneEnabled=!1,this.supportsHeightUnitConversion=!1}postscript(){super.postscript(),l(this.layer)&&this.addResolvingPromise(this._validateHeightModelInfo())}async _validateHeightModelInfo(){const t=new AbortController,i=t.signal;this.addHandles(o(()=>t.abort())),await s(()=>this.view.defaultsFromMap?.heightModelInfoReady,i),e(i);const r=n(this.layer,this.view.heightModelInfo,this.supportsHeightUnitConversion);if(r)throw r}};return t([i()],d.prototype,"view",void 0),t([i()],d.prototype,"slicePlaneEnabled",void 0),d=t([r("esri.views.3d.layers.LayerView3D")],d),d};export{a as LayerView3D};
