import{b0 as y,az as p,aA as t,gj as d}from"./app-k0jcl5PQ.js";import{S as c}from"./Boh3c6zT.chunk.js";import{S}from"./q-a0Zpry.chunk.js";function l(n){const a=y(),i=p(t.getPrivacy(n.entityId));function o(){return S.getShareLinkAccessType(i.data)==="protected"?c.Protected:c.JustMySchool}function s(e,r){if(r.privacy===c.PasswordProtected)throw d.logError(`Cannot update to legacy share privacy(${r.privacy}) for share with id ${e}`),new Error("invalid-share-privacy");return a(t.updateShare(e,r))}function h(e){const r=e??o();return a(t.createShareLink({objectId:n.entityId,privacy:r}))}function u(e){return a(t.deleteShare(e))}return{loaded:!!i.data,updateShareLink:s,createShareLink:h,deleteShareLink:u}}export{l as u};
//# sourceMappingURL=CX-R8N_3.chunk.js.map
