(window.webpackJsonpPlesk=window.webpackJsonpPlesk||[]).push([["app/progress-dialog"],{1070:function(e,t,r){"use strict";r.r(t);var s=r(156),n=r(155),a=r(1071);t.default=({locale:e,container:t,...r})=>{Object(n.render)(Object(n.createElement)(s.LocaleProvider,{messages:e},Object(n.createElement)(a.default,r)),t)}},1071:function(e,t,r){"use strict";r.r(t);var s=r(154),n=r.n(s),a=r(156),o=r(155),c=r(276),l=r.n(c);class i extends o.Component{renderErrors(e){return Array.isArray(e)&&0!==e.length?Object(o.createElement)(a.Alert,{intent:"danger"},Object(o.createElement)(a.Media,{image:Object(o.createElement)(a.Status,{intent:"danger"})},Object(o.createElement)("ul",{"data-type":"errors"},e.map(e=>Object(o.createElement)("li",{key:e},e))))):null}renderStatusText({status:e,progress:t,progressStatus:r}){const s={done:"statusDone",error:"statusError",not_started:"statusNotStarted",canceled:"statusCanceled"};return"running"===e&&r?r:"running"===e&&-1!==t?Object(o.createElement)(a.Translate,{content:"percentCompleted",params:{percent:t}}):s[e]?Object(o.createElement)(a.Translate,{content:s[e]}):null}render(){const{title:e,steps:t,isOpen:r,errors:s,onComplete:c,onHide:l,...i}=this.props,u=0===Object.keys(t).filter(e=>"error"===t[e].status).length;return Object(o.createElement)(a.ProgressDialog,n()({title:e,actions:l?Object(o.createElement)(a.Action,{onClick:l},Object(o.createElement)(a.Translate,{content:"minimize"})):null,cancelTitle:Object(o.createElement)(a.Translate,{content:"close","data-type":"close-button"}),isOpen:r,onFinish:c,onClose:l,"data-type":"progress-dialog"},i),Object.keys(t).map((e,r)=>{const{title:n,icon:c,status:l,progressStatus:i,errors:p}=t[e],d=Number(t[e].progress);return Object(o.createElement)(a.ProgressStep,{key:e,title:n,icon:{src:c},status:l,statusText:this.renderStatusText({status:l,progress:d,progressStatus:i}),progress:d},this.renderErrors(Array.isArray(p)&&p.length?p:"error"===l||u&&Object.keys(t).length-1===r?s:[]))}))}}i.propTypes={title:l.a.node.isRequired,steps:l.a.object.isRequired,isOpen:l.a.bool.isRequired,errors:l.a.array.isRequired,onComplete:l.a.func.isRequired,onHide:l.a.func.isRequired},t.default=i}}]);
//# sourceMappingURL=progress-dialog.js.map?c924762837fe505ed4a9