(window.webpackJsonpPlesk=window.webpackJsonpPlesk||[]).push([["app/task-progress-bar"],{1092:function(e,t,r){"use strict";r.r(t);var s=r(155),n=r(156),a=r(1093);t.default=({locale:e,container:t,...r})=>{Object(s.render)(Object(s.createElement)(n.LocaleProvider,{messages:e},Object(s.createElement)(a.default,r)),t)}},1093:function(e,t,r){"use strict";r.r(t),r.d(t,"TaskProgressBarItemContent",(function(){return m}));var s=r(155),n=r(633),a=r.n(n),o=r(156),c=r(276),i=r.n(c),l=r(145),p=r(1094),u=r.n(p);const m=({title:e,progress:t,output:r,errors:n,refresh:a})=>{const c=[];return e&&(e=Object(s.createElement)("span",{key:"title",dangerouslySetInnerHTML:{__html:u.a.sanitize(e)}})),t?c.push(Object(s.createElement)(o.Progress,{key:"progress"},Object(s.createElement)(o.ProgressStep,{title:e,status:"running",progress:t.value,statusText:void 0!==t.value?"".concat(t.value,"%"):void 0},t.onClick&&Object(s.createElement)(o.Link,{onClick:t.onClick},Object(s.createElement)(o.Translate,{content:"progressDialogLink"}))))):(c.push(e),r&&c.push(Object(s.createElement)(o.Text,{key:"output",component:"ul",intent:"muted",fontSize:"sm",className:"task-progress-bar-item__output"},r.map((e,t)=>Object(s.createElement)("li",{key:t.toString()},e)))),n&&c.push(Object(s.createElement)(o.Text,{key:"errors",component:"ul",intent:"muted",fontSize:"sm",className:"task-progress-bar-item__output"},n.map((e,t)=>Object(s.createElement)("li",{key:t.toString()},e)))),a&&c.push(Object(s.createElement)(o.Link,{key:"refresh",onClick:a.onClick,component:o.Text,fontSize:"sm"},a.title||Object(s.createElement)(o.Translate,{content:"refresh"})))),Object(s.createElement)("div",{className:"task-progress-bar-item__content"},c)};m.propTypes={title:i.a.string,progress:i.a.shape({value:i.a.number,onClick:i.a.func}),output:i.a.arrayOf(i.a.string),errors:i.a.arrayOf(i.a.string),refresh:i.a.shape({title:i.a.string,onClick:i.a.func.isRequired})},m.defaultProps={title:void 0,progress:void 0,output:void 0,errors:void 0,refresh:void 0};const k=({items:e,isOpen:t})=>{const r=[];return e.forEach(e=>{e instanceof l.Task.ProgressBar.Item&&r.push((e=>{const{key:t,intent:r,onClose:n,...o}=e.toToast();return{key:t,intent:r,onClose:n,message:Object(s.createElement)(m,o),closable:!o.progress,className:a()("task-progress-bar-item",{["task-progress-bar-item--".concat(r)]:r})}})(e))}),t?Object(s.createElement)(o.Toaster,{id:"asyncProgressBar",position:"bottom-end",toasts:r}):null};k.propTypes={items:i.a.array.isRequired,isOpen:i.a.bool.isRequired},t.default=k}}]);
//# sourceMappingURL=task-progress-bar.js.map?b2759118c5375d1d3839