"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1799],{64163:function(e,n,t){var i=t(1413),r=t(72791),s=t(61889),o=t(11135),a=t(25787),c=t(23814),l=t(80184);n.Z=(0,a.Z)((function(e){return(0,o.Z)((0,i.Z)({},c.xx))}))((function(e){var n=e.classes,t=e.label,i=void 0===t?"":t,o=e.content,a=e.multiLine,c=void 0!==a&&a,d=e.actionButton;return(0,l.jsx)(r.Fragment,{children:(0,l.jsxs)(s.ZP,{className:n.prefinedContainer,children:[""!==i&&(0,l.jsx)(s.ZP,{item:!0,xs:12,className:n.predefinedTitle,children:i}),(0,l.jsxs)(s.ZP,{item:!0,xs:12,className:"".concat(n.predefinedList," ").concat(d?n.includesActionButton:""),children:[(0,l.jsx)(s.ZP,{item:!0,xs:12,className:c?n.innerContentMultiline:n.innerContent,children:o}),d&&(0,l.jsx)("div",{className:n.overlayShareOption,children:d})]})]})})}))},61799:function(e,n,t){t.r(n);var i=t(29439),r=t(72791),s=t(51691),o=t(61889),a=t(40986),c=t(81207),l=t(21435),d=t(64163),u=t(37516),f=t(23508),x=t(38734),m=t(87995),h=t(25469),j=t(80184);n.default=function(e){var n=e.closeFormatModalAndRefresh,t=e.deleteOpen,v=e.allDrives,Z=e.drivesToFormat,b=(0,h.TL)(),p=(0,r.useState)(!1),g=(0,i.Z)(p,2),C=g[0],P=g[1],F=(0,r.useState)(""),S=(0,i.Z)(F,2),k=S[0],A=S[1],D=(0,r.useState)(!1),E=(0,i.Z)(D,2),L=E[0],N=E[1];return(0,j.jsx)(f.Z,{title:"Format ".concat(v?"All ":""," Drives"),confirmText:"Format Drive".concat(Z.length>1||v?"s":""),confirmButtonProps:{disabled:"YES, PROCEED"!==k},isOpen:t,isLoading:C,onConfirm:function(){C||(P(!0),c.Z.invoke("POST","/api/v1/directpv/drives/format",{drives:Z,force:L}).then((function(e){P(!1),n(!0,e.formatIssuesList)})).catch((function(e){P(!1),b((0,m.Ih)(e))})))},onClose:function(){n(!1,[])},titleIcon:(0,j.jsx)(x.QaX,{}),confirmationContent:(0,j.jsxs)(r.Fragment,{children:[(0,j.jsxs)(s.Z,{children:[!v&&(0,j.jsxs)(r.Fragment,{children:[(0,j.jsx)(d.Z,{label:"Selected Drive".concat(Z.length>1?"s":""),content:Z.join(", ")}),(0,j.jsx)("br",{})]}),(0,j.jsx)(o.ZP,{item:!0,xs:12,children:(0,j.jsx)(u.Z,{value:"force",id:"force",name:"force",checked:L,onChange:function(e){N(e.target.checked)},label:"Force Format",indicatorLabels:["Yes","No"]})}),"Are you sure you want to format"," ",v?(0,j.jsx)("strong",{children:"All"}):"the selected"," drive",Z.length>1||v?"s":"","?.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),(0,j.jsx)("strong",{children:"All information contained will be erased and cannot be recovered"}),(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"To continue please type ",(0,j.jsx)("b",{children:"YES, PROCEED"})," in the box.",(0,j.jsx)(o.ZP,{item:!0,xs:12,children:(0,j.jsx)(l.Z,{id:"format-confirm",name:"format-confirm",onChange:function(e){A(e.target.value)},label:"",value:k})})]}),C&&(0,j.jsx)(a.Z,{})]})})}}}]);
//# sourceMappingURL=1799.90db5583.chunk.js.map