"use strict";var S=Object.create;var a=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf;var k=Object.prototype.hasOwnProperty;var p=(e,o)=>a(e,"name",{value:o,configurable:true});var E=(e,o)=>{for(var r in o)a(e,r,{get:o[r],enumerable:true})};var g=(e,o,r,n)=>{if(o&&typeof o==="object"||typeof o==="function"){for(let t of v(o))if(!k.call(e,t)&&t!==r)a(e,t,{get:()=>o[t],enumerable:!(n=f(o,t))||n.enumerable})}return e};var u=(e,o,r)=>(r=e!=null?S(P(e)):{},g(o||!e||!e.__esModule?a(r,"default",{value:e,enumerable:true}):r,e));var W=e=>g(a({},"__esModule",{value:true}),e);var y=(e,o,r,n)=>{var t=n>1?void 0:n?f(o,r):o;for(var c=e.length-1,l;c>=0;c--)if(l=e[c])t=(n?l(o,r,t):l(t))||t;if(n&&t)a(o,r,t);return t};var N={};E(N,{default:()=>z});module.exports=W(N);var s=require("react/jsx-runtime");var b=require("@mdi/js");var h=require("mobx-react");var I=require("react");var d=require("react-intl");var x=u(require("react-jss"));var M=require("../../../config");var R=u(require("../../ui/icon"));const m=(0,d.defineMessages)({text:{id:"connectionLostBanner.message",defaultMessage:"Oh no! Ferdium lost the connection to {name}."},moreInformation:{id:"connectionLostBanner.informationLink",defaultMessage:"What happened?"},cta:{id:"connectionLostBanner.cta",defaultMessage:"Reload Service"}});const w=window?.matchMedia("(prefers-reduced-motion: no-preference)")?"opacity 0.25s":"none";const T=p(e=>({root:{background:e.colorBackground,borderRadius:e.borderRadius,position:"absolute",zIndex:300,height:50,display:"flex",flexDirection:"row",alignItems:"center",bottom:10,right:10,justifyContent:"center",padding:10,fontSize:12},link:{display:"inline-flex",opacity:.7},button:{transition:w,color:e.colorText,border:[1,"solid",e.colorText],borderRadius:e.borderRadiusSmall,padding:4,fontSize:12,marginLeft:15,"&:hover":{opacity:.8}},icon:{marginRight:10,fill:e.styleTypes.danger.accent}}),"styles");let i=class extends I.Component{render(){const{classes:o,name:r,reload:n,intl:t}=this.props;return(0,s.jsxs)("div",{className:o.root,children:[(0,s.jsx)(R.default,{icon:b.mdiAlert,className:o.icon}),(0,s.jsxs)("p",{children:[t.formatMessage(m.text,{name:r}),(0,s.jsx)("br",{}),(0,s.jsx)("a",{href:`${M.LIVE_API_FERDIUM_WEBSITE}/support#what-does-franz-lost-the-connection-to-service-mean`,className:o.link,children:t.formatMessage(m.moreInformation)})]}),(0,s.jsx)("button",{type:"button",className:o.button,onClick:n,children:t.formatMessage(m.cta)})]})}};p(i,"ConnectionLostBanner");i=y([h.observer],i);var z=(0,d.injectIntl)((0,x.default)(T)(i));
