"use strict";var b=Object.create;var d=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var I=Object.getPrototypeOf;var k=Object.prototype.hasOwnProperty;var c=(e,t)=>d(e,"name",{value:t,configurable:true});var A=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:true})};var u=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of P(t))if(!k.call(e,o)&&o!==r)d(e,o,{get:()=>t[o],enumerable:!(n=f(t,o))||n.enumerable})}return e};var M=(e,t,r)=>(r=e!=null?b(I(e)):{},u(t||!e||!e.__esModule?d(r,"default",{value:e,enumerable:true}):r,e));var H=e=>u(d({},"__esModule",{value:true}),e);var y=(e,t,r,n)=>{var o=n>1?void 0:n?f(t,r):t;for(var i=e.length-1,a;i>=0;i--)if(a=e[i])o=(n?a(t,r,o):a(o))||o;if(n&&o)d(t,r,o);return o};var T={};A(T,{default:()=>S});module.exports=H(T);var s=require("react/jsx-runtime");var h=require("mobx-react");var v=require("react");var m=require("react-intl");var x=M(require("react-jss"));var g=M(require("../../ui/button"));var C=require("../../ui/headline");const p=(0,m.defineMessages)({headline:{id:"service.errorHandler.headline",defaultMessage:"Oh no!"},text:{id:"service.errorHandler.text",defaultMessage:"{name} has failed to load."},action:{id:"service.errorHandler.action",defaultMessage:"Reload {name}"},editAction:{id:"service.errorHandler.editAction",defaultMessage:"Edit {name}"},errorMessage:{id:"service.errorHandler.message",defaultMessage:"Error"}});const R=c(e=>({component:{left:0,position:"absolute",top:0,width:"100%",zIndex:0,alignItems:"center",background:e.colorWebviewErrorHandlerBackground,display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center"},buttonContainer:{display:"flex",flexDirection:"row",height:"auto",margin:[40,0,20],"& button":{margin:[0,10,0,10]}}}),"styles");let l=class extends v.Component{render(){const{name:t,reload:r,edit:n,errorMessage:o,classes:i,intl:a}=this.props;return(0,s.jsxs)("div",{className:i.component,children:[(0,s.jsx)(C.H1,{children:a.formatMessage(p.headline)}),(0,s.jsx)("p",{children:a.formatMessage(p.text,{name:t})}),(0,s.jsxs)("p",{children:[(0,s.jsxs)("strong",{children:[a.formatMessage(p.errorMessage),":"]})," ",o]}),(0,s.jsxs)("div",{className:i.buttonContainer,children:[(0,s.jsx)(g.default,{label:a.formatMessage(p.editAction,{name:t}),buttonType:"inverted",onClick:()=>n()}),(0,s.jsx)(g.default,{label:a.formatMessage(p.action,{name:t}),buttonType:"inverted",onClick:()=>r()})]})]})}};c(l,"WebviewErrorHandler");l=y([h.observer],l);var S=(0,m.injectIntl)((0,x.default)(R,{injectTheme:true})(l));
