/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../core/accessorSupport/decorators.js";function r(e){return"portalItem"in e}const s=s=>{const p=s;let o=class extends p{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):r(this)?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return e([t({type:String})],o.prototype,"apiKey",null),o=e([i("esri.layers.mixins.APIKeyMixin")],o),o};export{s as APIKeyMixin};
