import{r as i}from"./vue.esm.01cc5dc9.js";import{n as p}from"./plugin-vue2_normalizer.ed7092a9.js";const _={__name:"Error",props:{showTitle:{default:!0}},setup(s,{expose:e}){const n=s,r=i(null),t=i(null);function l(){t.value=null,r.value=null}function o(a){if(a.status===0)r.value=null,t.value="Failed to contact temBoard server.";else{r.value=a.status;const c=a.getResponseHeader("content-type");c.includes("application/json")?(t.value=JSON.parse(a.responseText).error,t.value===""&&(t.value="Unknown error. Please contact temBoard administrator.")):c.includes("text/plain")?t.value=`<pre>${a.responseText}</pre>`:t.value="Unknown error. Please contact temBoard administrator."}}function u(a){r.value=null,t.value=a}return e({clear:l,fromXHR:o,setHTML:u}),{__sfc:!0,code:r,error:t,props:n,clear:l,fromXHR:o,setHTML:u}}};var d=function(){var e=this,n=e._self._c,r=e._self._setupProxy;return r.error?n("div",{staticClass:"alert alert-danger",attrs:{role:"alert"}},[n("h4",{staticClass:"modal-title",attrs:{id:"ErrorLabel"}},[e.showTitle?[e._v("Error "+e._s(r.code))]:e._e(),n("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:function(t){return t.preventDefault(),r.clear.apply(null,arguments)}}},[n("span",{attrs:{"aria-hidden":"true"}},[e._v("\xD7")])])],2),n("div",{staticClass:"pr-3"},[n("p",{domProps:{innerHTML:e._s(r.error)}})])]):e._e()},v=[],f=p(_,d,v,!1,null,null,null,null);const C=f.exports;export{C as E};
