/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
import{a as n}from"./YHLI26F7.js";import{b as i}from"./AJYEUPAN.js";import"./5IZMQFRP.js";import"./FOQPGXXA.js";import{H as o,h as a,i as s}from"./5CQPQ7AE.js";import"./3QPJ2JCA.js";var p=a`[role=alert]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}`,r=class extends o{constructor(){super(),this._messages=n({name:"instant-apps-app-error"}),this._handleErrorMessage=this._handleErrorMessage.bind(this),this.listenOn(document,"instant-apps-error",this._handleErrorMessage)}static{this.properties={errorMessage:16}}static{this.styles=p}async clearErrorMessage(){this.errorMessage=void 0}_handleErrorMessage(e){if(!e.detail||!this._messages?.errorMessages)return;let t=this._messages.errorMessages[e.detail];t&&(this.errorMessage=t)}render(){return s`<div role=alert>${this.errorMessage&&s`<p>${this.errorMessage}</p>`||""}</div>`}};i("instant-apps-app-error",r);export{r as InstantAppsAppError};
