import{S as e}from"./lz-string-CMojKG3P.js";import{$ as t,Et as n,Ft as r,Gt as i,Pt as a,an as o,dt as s,ft as c,lt as l}from"./src-DTHkTkyy-Ce1TZuRw.js";import{h as u}from"./connect-BSkeWkEI-BYzoVZOI.js";import{useMemo as d}from"react";import{jsx as f}from"react/jsx-runtime";function p(){let p=i(),m=p?.type===`driveSettings`,h=m?p.driveId:void 0,[g]=a(h),_=o(),v=d(()=>g?_.some(t=>t.collectionId===e(`main`,g.header.id)):!1,[_,g]),y=r(g);if(!h||!g)return null;async function b(e,t){await l(e.header.id,t)}async function x(e,t){await c(e.header.id,t)}async function S(e,t){await s(e.header.id,t)}return f(u,{drive:g,sharingType:v?`PUBLIC`:`LOCAL`,availableOffline:!v,systemInfo:y,open:m,onRenameDrive:b,onDeleteDrive:()=>n({type:`deleteDrive`,driveId:h}),onChangeAvailableOffline:S,onChangeSharingType:x,onOpenChange:e=>{if(!e)return t()}})}export{p as DriveSettingsModal};
//# sourceMappingURL=DriveSettingsModal-BdcjrRh9-D2Ckg0Qc.js.map