import{aT as u,l as d,k as h,j as e,E as x,a9 as n}from"./app-BgLa5dit.js";import{M as j}from"./DwzYo0zp.chunk.js";function y({catalogName:t,region:l,closePopup:s}){const[a,i]=u.useState(!1),r=d(),o=h();async function c(){i(!0),o(j.deleteCatalog(t,l)).then(()=>r.success(`Successfully deleted catalog: ${t}`)).catch(()=>r.error(`Failed to delete catalog: ${t}. Please try again.`)).finally(s)}return e.jsx(x,{title:"Delete Catalog",closePopup:s,showLoadingSpinner:!t,children:!!t&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Are you sure you want to delete ",e.jsx("strong",{children:t}),"?"]}),e.jsxs("p",{children:["This will ",e.jsx("strong",{children:"permanently"})," delete the catalog and cannot be undone."]}),e.jsxs(n,{children:[e.jsx(n.Cancel,{onClick:s}),e.jsx(n.Submit,{showSpinner:a,onClick:c,variant:"danger",text:"Delete Catalog"})]})]})})}export{y as DeleteCatalogView};
//# sourceMappingURL=BOfEyHkc.chunk.js.map
