/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as r}from"tslib";import e from"../core/Error.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{schedule as t}from"../core/scheduling.js";import{property as s,subclass as n}from"../core/accessorSupport/decorators.js";import i from"./Layer.js";import{PortalLayer as p}from"./mixins/PortalLayer.js";let l=class extends(p(o(i))){constructor(r){super(r),this.resourceInfo=null,this.type="unknown"}initialize(){this.addResolvingPromise(new Promise((r,o)=>{t(()=>{const r=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let t="Unknown layer type";r&&(t+=" "+r),o(new e("layer:unknown-layer-type",t,{layerType:r}))})}))}read(r,e){super.read({resourceInfo:r},e)}write(r,e){return null}};r([s({readOnly:!0})],l.prototype,"resourceInfo",void 0),r([s({type:["show","hide"]})],l.prototype,"listMode",void 0),r([s({json:{read:!1},readOnly:!0,value:"unknown"})],l.prototype,"type",void 0),l=r([n("esri.layers.UnknownLayer")],l);const a=l;export{a as default};
