import{$ as e,Ct as t,Gt as n,It as r,Pt as i,et as a}from"./src-DTHkTkyy-Ce1TZuRw.js";import{o}from"./connect-BSkeWkEI-BYzoVZOI.js";import{n as s}from"./toast-DnODOv28-DJtc4rMD.js";import{t as c}from"./useTranslation-D1YdOuD6.js";import{jsx as l}from"react/jsx-runtime";var u=()=>{let u=n(),d=u?.type===`deleteDrive`,f=d?u.driveId:void 0,[p]=i(f),m=r();if(!p)return null;async function h(){f&&(await a(f),t(m?.[0]),e(),s(g(`notifications.deleteDriveSuccess`),{type:`connect-deleted`}))}let{t:g}=c();return l(o,{open:d,driveName:p.header.name,onCancel:e,header:g(`modals.deleteDrive.title`,{label:p.header.name}),body:g(`modals.deleteDrive.body`),inputPlaceholder:g(`modals.deleteDrive.inputPlaceholder`),cancelLabel:g(`common.cancel`),continueLabel:g(`common.delete`),onContinue:()=>h(),onOpenChange:t=>{if(!t)return e()}})};export{u as DeleteDriveModal};
//# sourceMappingURL=DeleteDriveModal-Cb43NeNu-BkdOB7Wp.js.map