import{bc as h,az as p,aA as m,aI as g,ao as c,aF as S,L as f,v as L}from"./app-k0jcl5PQ.js";import{D as k}from"./BEA7dEaU.chunk.js";import{u as A}from"./CX-R8N_3.chunk.js";import"./Boh3c6zT.chunk.js";import"./q-a0Zpry.chunk.js";import"./BHfFK47N.chunk.js";const I="sharev2.deleteLegacyShareConfirmation",e=f.encloseNamespace(I);function v(t){var o;const n=h(),a=p(m.getShare(t.shareId)),[i,s]=g.useState(!1),{deleteShareLink:l}=A({entityId:(o=a.data)==null?void 0:o.objectId.toString()});function d(){var r;s(!0),l((r=a.data)==null?void 0:r.shareId).then(()=>{s(!1),n.success(e("deleteSuccess")),t.closePopup(),t.returnAppLink&&L.trigger(t.returnAppLink)}).catch(()=>{n.error(e("deleteFailed"))}).finally(()=>{s(!1)})}const u=a.hasCompleted;return c.jsx(S,{title:e("title"),closePopup:t.closePopup,showLoadingSpinner:!u,children:c.jsx(k,{loading:i,phrases:{leadingSentence:e("intro"),bulletPoints:[e("loseAccessInfo"),e("loseAccessUsage"),e("removeFromStudentFeed")],acknowledgement:e("acknowledgement"),deleteButton:e("delete")},onDelete:d})})}export{v as DeleteLegacyShareConfirmationView};
//# sourceMappingURL=BjbJRnR6.chunk.js.map
