"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[3090],{83090:function(e,n,t){t.r(n);var s=t(77439),r=t(57223),i=t(537),o=t(12795),c=t(64519),l=t(90055),u=t(28939),a=t(70783),d=t(67094),f=t(18054),h={setErrorSnackMessage:c.Ih},v=(0,i.$j)(null,h);n.default=v((function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,i=e.selectedBucket,c=e.selectedObjects,h=e.setErrorSnackMessage,v=e.versioning,p=(0,r.useState)(!1),k=(0,s.Z)(p,2),b=k[0],g=k[1],j=(0,l.Z)((function(){return n(!0)}),(function(e){return h(e)})),C=(0,s.Z)(j,2),Z=C[0],x=C[1];if(!c)return null;return(0,f.jsx)(u.Z,{title:"\u5220\u9664\u5bf9\u8c61",confirmText:"\u5220\u9664",isOpen:t,titleIcon:(0,f.jsx)(a.Nv,{}),isLoading:Z,onConfirm:function(){for(var e=[],n=0;n<c.length;n++)c[n].endsWith("/")?e.push({path:c[n],versionID:"",recursive:!0}):e.push({path:c[n],versionID:"",recursive:!1});e&&x("POST","/api/v1/buckets/".concat(i,"/delete-objects?all_versions=").concat(b),e)},onClose:function(){return n(!1)},confirmationContent:(0,f.jsxs)(o.Z,{children:["\u60a8\u786e\u5b9a\u8981\u5220\u9664\u9009\u5b9a\u7684",c.length,"\u4e2a\u5bf9\u8c61\u5417?",v&&(0,f.jsx)(d.Z,{label:"\u5220\u9664\u6240\u6709\u7248\u672c",indicatorLabels:["\u662f","\u5426"],checked:b,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:function(e){g(!b)},description:""})]})})}))}}]);
//# sourceMappingURL=3090.ea196a69.chunk.js.map