"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[3851],{3851:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var s=n(65043),c=n(89923),l=n(64159),o=n(21383),r=n(25448),u=n(58661),a=n(70579);const i=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:i}=e;const d=(0,o.jL)(),[p,b]=(0,r.A)((()=>t(!0)),(e=>d((0,l.C9)(e))));if(!i)return null;return(0,a.jsx)(u.A,{title:"Delete Bucket",confirmText:"Delete",isOpen:n,titleIcon:(0,a.jsx)(c.xWY,{}),isLoading:p,onConfirm:()=>{b("DELETE",`/api/v1/buckets/${i}`,{name:i})},onClose:()=>t(!1),confirmationContent:(0,a.jsxs)(s.Fragment,{children:["Are you sure you want to delete bucket ",(0,a.jsx)("b",{children:i}),"? ",(0,a.jsx)("br",{}),"A bucket can only be deleted if it's empty."]})})}},25448:(e,t,n)=>{n.d(t,{A:()=>l});var s=n(65043),c=n(20649);const l=(e,t)=>{const[n,l]=(0,s.useState)(!1);return[n,(n,s,o,r)=>{l(!0),c.A.invoke(n,s,o,r).then((t=>{l(!1),e(t)})).catch((e=>{l(!1),t(e)}))}]}}}]);
//# sourceMappingURL=3851.ee2f94b6.chunk.js.map