/*
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/MultiOriginJSONSupport","../core/scheduling","../core/accessorSupport/decorators/property","../core/arrayUtils","../core/has","../core/accessorSupport/ensureType","../core/accessorSupport/decorators/subclass","./Layer","./mixins/PortalLayer"],(function(e,r,o,t,n,s,i,c,a,u,l,p){"use strict";let y=function(r){function t(e){var o;return(o=r.call(this,e)||this).resourceInfo=null,o.type="unknown",o}e._inheritsLoose(t,r);var s=t.prototype;return s.initialize=function(){this.addResolvingPromise(new Promise(((e,r)=>{n.schedule((()=>{const e=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let t="Unknown layer type";e&&(t+=" "+e),r(new o("layer:unknown-layer-type",t,{layerType:e}))}))})))},s.read=function(e,o){r.prototype.read.call(this,{resourceInfo:e},o)},s.write=function(){return null},t}(p.PortalLayer(t.MultiOriginJSONMixin(l)));r.__decorate([s.property({readOnly:!0})],y.prototype,"resourceInfo",void 0),r.__decorate([s.property({type:["show","hide"]})],y.prototype,"listMode",void 0),r.__decorate([s.property({json:{read:!1},readOnly:!0,value:"unknown"})],y.prototype,"type",void 0),y=r.__decorate([u.subclass("esri.layers.UnknownLayer")],y);return y}));
