"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[711],{50711:function(e,t,n){n.r(t);var s=n(29439),o=n(72791),i=n(51691),r=n(9505),l=n(2148),c=n(38734),u=n(37516),a=n(87995),d=n(25469),f=n(80184);t.default=function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,h=e.selectedBucket,v=e.selectedObjects,p=e.versioning,b=(0,d.TL)(),j=(0,o.useState)(!1),k=(0,s.Z)(j,2),C=k[0],D=k[1],Z=(0,r.Z)((function(){return t(!0)}),(function(e){return b((0,a.Ih)(e))})),g=(0,s.Z)(Z,2),x=g[0],O=g[1];if(!v)return null;return(0,f.jsx)(l.Z,{title:"Delete Objects",confirmText:"Delete",isOpen:n,titleIcon:(0,f.jsx)(c.NvT,{}),isLoading:x,onConfirm:function(){for(var e=[],t=0;t<v.length;t++)v[t].endsWith("/")?e.push({path:v[t],versionID:"",recursive:!0}):e.push({path:v[t],versionID:"",recursive:!1});e&&O("POST","/api/v1/buckets/".concat(h,"/delete-objects?all_versions=").concat(C),e)},onClose:function(){return t(!1)},confirmationContent:(0,f.jsxs)(i.Z,{children:["Are you sure you want to delete the selected ",v.length," ","objects?"," ",p&&(0,f.jsx)(u.Z,{label:"Delete All Versions",indicatorLabels:["Yes","No"],checked:C,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:function(e){D(!C)},description:""})]})})}}}]);
//# sourceMappingURL=711.f849ab21.chunk.js.map