import{$ as e,Gt as t,Ht as n,Vt as r,en as i,tt as a,wt as o}from"./src-DTHkTkyy-Ce1TZuRw.js";import{s}from"./connect-BSkeWkEI-BYzoVZOI.js";import{n as c}from"./toast-DnODOv28-DJtc4rMD.js";import{t as l}from"./useTranslation-D1YdOuD6.js";import"react";import{jsx as u}from"react/jsx-runtime";var d=()=>{let d=t(),f=d?.type===`deleteItem`,p=f?d.id:void 0,{t:m}=l(),h=r(p),g=h?.name,_=h?.kind,v=i(),y=n(h?.parentFolder);async function b(){if(!v||!p)return;e();let t=_===`FOLDER`?`notifications.deleteFolderSuccess`:`notifications.fileDeleteSuccess`;await a(v,p),o(y),c(m(t),{type:`connect-deleted`})}return u(s,{open:f,onDelete:()=>b(),onCancel:()=>e(),header:m(`modals.deleteItem.${_?.toLowerCase()}.header`,{item:g}),body:m(`modals.deleteItem.${_?.toLowerCase()}.body`),cancelLabel:m(`common.cancel`),deleteLabel:m(`common.delete`)})};export{d as DeleteItemModal};
//# sourceMappingURL=DeleteItemModal-Brq4QKdd-Bu3eg-_9.js.map