"use strict";var x=Object.create;var o=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var F=Object.getPrototypeOf;var T=Object.prototype.hasOwnProperty;var d=(s,e)=>o(s,"name",{value:e,configurable:true});var C=(s,e)=>{for(var a in e)o(s,a,{get:e[a],enumerable:true})};var u=(s,e,a,r)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let i of w(e))if(!T.call(s,i)&&i!==a)o(s,i,{get:()=>e[i],enumerable:!(r=U(e,i))||r.enumerable})}return s};var n=(s,e,a)=>(a=s!=null?x(F(s)):{},u(e||!s||!s.__esModule?o(a,"default",{value:s,enumerable:true}):a,s));var I=s=>u(o({},"__esModule",{value:true}),s);var k={};C(k,{default:()=>A});module.exports=I(k);var p=require("react/jsx-runtime");var f=n(require("classnames"));var v=require("react");var l=require("react-intl");var M=n(require("react-jss"));var g=n(require("../../../helpers/array-helpers"));var y=n(require("../FullscreenLoader"));var h=n(require("./styles"));const t=(0,l.defineMessages)({addingFreeFeatures:{id:"loading.addingFreeFeatures",defaultMessage:"Adding free features"},makingApplicationUsable:{id:"loading.makingApplicationUsable",defaultMessage:"Making application usable"},removingUnproductivePaywalls:{id:"loading.removingUnproductivePaywalls",defaultMessage:"Removing unproductive paywalls"},creatingCustomServerSoftware:{id:"loading.creatingCustomServerSoftware",defaultMessage:"Creating custom server software"},increasingProductivity:{id:"loading.increasingProductivity",defaultMessage:"Increasing productivity"},listeningToOurUserbase:{id:"loading.listeningToOurUserbase",defaultMessage:"Listening to our userbase"},fixingBugs:{id:"loading.fixingBugs",defaultMessage:"Fixing bugs"}});class c extends v.Component{interval=null;constructor(e){super(e);this.state={step:0}}componentDidMount(){const{intl:e}=this.props;const a=(0,g.default)([e.formatMessage(t.addingFreeFeatures),e.formatMessage(t.makingApplicationUsable),e.formatMessage(t.removingUnproductivePaywalls),e.formatMessage(t.creatingCustomServerSoftware),e.formatMessage(t.increasingProductivity),e.formatMessage(t.listeningToOurUserbase),e.formatMessage(t.fixingBugs)]);const r=this.props.texts||a;this.interval=setInterval(()=>{this.setState(i=>({step:i.step===r.length-1?0:i.step+1}))},2500)}componentWillUnmount(){if(this.interval){clearInterval(this.interval)}}render(){const{classes:e,theme:a,intl:r}=this.props;const{step:i}=this.state;const P=(0,g.default)([r.formatMessage(t.addingFreeFeatures),r.formatMessage(t.makingApplicationUsable),r.formatMessage(t.removingUnproductivePaywalls),r.formatMessage(t.creatingCustomServerSoftware),r.formatMessage(t.increasingProductivity),r.formatMessage(t.listeningToOurUserbase),r.formatMessage(t.fixingBugs)]);const S=this.props.texts||P;return(0,p.jsx)(y.default,{className:e.component,spinnerColor:a.colorAppLoaderSpinner,children:S.map((m,b)=>(0,p.jsx)("span",{className:(0,f.default)({[`${e.slogan}`]:true,[`${e.visible}`]:i===b}),children:m},m))})}}d(c,"AppLoader");var A=(0,l.injectIntl)((0,M.default)(h.default,{injectTheme:true})(c));
