"use strict";var u=Object.create;var o=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var w=Object.getPrototypeOf;var M=Object.prototype.hasOwnProperty;var l=(t,e)=>o(t,"name",{value:e,configurable:true});var I=(t,e)=>{for(var s in e)o(t,s,{get:e[s],enumerable:true})};var p=(t,e,s,c)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let n of v(e))if(!M.call(t,n)&&n!==s)o(t,n,{get:()=>e[n],enumerable:!(c=_(e,n))||c.enumerable})}return t};var y=(t,e,s)=>(s=t!=null?u(w(t)):{},p(e||!t||!t.__esModule?o(s,"default",{value:t,enumerable:true}):s,t));var b=t=>p(o({},"__esModule",{value:true}),t);var k={};I(k,{default:()=>S});module.exports=b(k);var r=require("react/jsx-runtime");var m=y(require("markdown-to-jsx"));var h=require("mobx-react");var f=require("react");var a=require("react-intl");var d=require("../../../environment-remote");var i=require("../../../helpers/update-helpers");const N=(0,a.defineMessages)({headline:{id:"settings.releasenotes.headline",defaultMessage:"Release Notes"},connectionError:{id:"settings.releasenotes.connectionError",defaultMessage:"An error occurred when connecting to Github, please try again later."},connectionErrorPageMissing:{id:"settings.releasenotes.connectionErrorPageMissing",defaultMessage:"An error occurred when connecting to Github, the page you are looking for is missing."}});class g extends f.Component{constructor(e){super(e);this.state={data:""}}async componentDidMount(){const{intl:e}=this.props;const s=await(0,i.getUpdateInfoFromGH)(window.location.href,d.ferdiumVersion,e);this.setState({data:s})}overrideAnchor=e=>(0,r.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer"});render(){const{intl:e}=this.props;const{data:s}=this.state;return(0,r.jsxs)("div",{className:"settings__main",children:[(0,r.jsxs)("div",{className:"settings__header",children:[(0,r.jsxs)("span",{className:"settings__header-item",children:["Ferdium ",(0,i.getFerdiumVersion)(window.location.href,d.ferdiumVersion)," "," | "]}),(0,r.jsx)("span",{className:"settings__header-item__secondary",children:e.formatMessage(N.headline)})]}),(0,r.jsx)("div",{className:"settings__body releasenotes__body",children:(0,r.jsx)(m.default,{options:{wrapper:"article",overrides:{a:this.overrideAnchor}},children:s})})]})}}l(g,"ReleaseNotesDashboard");var S=(0,a.injectIntl)((0,h.observer)(g));
