"use strict";var b=Object.create;var m=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var k=Object.getPrototypeOf;var B=Object.prototype.hasOwnProperty;var _=(e,s)=>m(e,"name",{value:s,configurable:true});var L=(e,s)=>{for(var r in s)m(e,r,{get:s[r],enumerable:true})};var h=(e,s,r,a)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let t of C(s))if(!B.call(e,t)&&t!==r)m(e,t,{get:()=>s[t],enumerable:!(a=f(s,t))||a.enumerable})}return e};var v=(e,s,r)=>(r=e!=null?b(k(e)):{},h(s||!e||!e.__esModule?m(r,"default",{value:e,enumerable:true}):r,e));var x=e=>h(m({},"__esModule",{value:true}),e);var w=(e,s,r,a)=>{var t=a>1?void 0:a?f(s,r):s;for(var n=e.length-1,i;n>=0;n--)if(i=e[n])t=(a?i(s,r,t):i(t))||t;if(a&&t)m(s,r,t);return t};var A={};L(A,{default:()=>I});module.exports=x(A);var o=require("react/jsx-runtime");var N=require("lodash");var p=require("mobx-react");var y=require("react");var u=require("react-intl");var M=require("../../api/apiBase");var P=v(require("../../helpers/array-helpers"));var R=v(require("../../helpers/serverless-helpers"));var l=v(require("../ui/Link"));var S=require("../ui/headline");const g=(0,u.defineMessages)({signupButton:{id:"welcome.signupButton",defaultMessage:"Create a free account"},loginButton:{id:"welcome.loginButton",defaultMessage:"Login to your account"},changeServerMessage:{id:"login.changeServerMessage",defaultMessage:"You are using {serverNameParse} Server, do you want to switch?"},changeServer:{id:"login.changeServer",defaultMessage:"Change here!"},serverless:{id:"services.serverless",defaultMessage:"Use Ferdium without an Account"}});let c=class extends y.Component{render(){const{loginRoute:s,signupRoute:r,changeServerRoute:a,intl:t}=this.props;let{recipes:n}=this.props;n=(0,P.default)(n);n.length=8*2;let i=(0,M.serverName)();i=i==="Custom"?"a Custom":i;return(0,o.jsxs)("div",{className:"welcome",children:[(0,o.jsx)("div",{className:"welcome__content",children:(0,o.jsx)("img",{src:"./assets/images/logo.svg",className:"welcome__logo",alt:""})}),(0,o.jsx)("div",{className:"welcome__text",children:(0,o.jsx)(S.H1,{children:"Ferdium"})}),(0,o.jsxs)("div",{className:"welcome__buttons",children:[(0,o.jsx)(l.default,{to:r,className:"button button__inverted",children:t.formatMessage(g.signupButton)}),(0,o.jsx)(l.default,{to:s,className:"button",children:t.formatMessage(g.loginButton)}),(0,o.jsxs)("div",{className:"welcome__text__change-server",children:[(0,o.jsx)("span",{children:t.formatMessage(g.changeServerMessage,{serverNameParse:i})}),(0,o.jsx)(l.default,{to:a,className:"button__change-server",children:(0,o.jsx)("span",{children:t.formatMessage(g.changeServer)})})]}),(0,o.jsx)("hr",{className:"settings__hr-sections",style:{marginTop:24,marginBottom:24,borderStyle:"solid"}}),(0,o.jsx)("button",{type:"button",className:"button",onClick:()=>(0,R.default)(this.props.actions),onKeyDown:N.noop,children:t.formatMessage(g.serverless)})]}),(0,o.jsx)("div",{className:"welcome__featured-services",children:n.map(d=>(0,o.jsx)("div",{className:"welcome__featured-service",children:(0,o.jsx)("img",{src:d.icons?.svg,alt:""},d.id)},d.id))})]})}};_(c,"Welcome");c=w([(0,p.inject)("actions"),p.observer],c);var I=(0,u.injectIntl)(c);
