import{bc as u,az as m,aA as h,aI as g,ao as l,aF as f,L as S,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 C="sharev2.deleteOpenClassroomConfirmation",e=S.encloseNamespace(C);function b(t){var o;const n=u(),s=m(h.getShare(t.shareId)),[i,a]=g.useState(!1),{deleteShareLink:c}=A({entityId:(o=s.data)==null?void 0:o.objectId.toString()});function d(){var r;a(!0),c((r=s.data)==null?void 0:r.shareId).then(()=>{a(!1),n.success(e("deleteSuccess")),t.closePopup(),t.returnAppLink&&L.trigger(t.returnAppLink)}).catch(()=>{n.error(e("deleteFailed"))}).finally(()=>{a(!1)})}const p=s.hasCompleted;return l.jsx(f,{title:e("title"),closePopup:t.closePopup,showLoadingSpinner:!p,children:l.jsx(k,{loading:i,phrases:{leadingSentence:e("intro"),bulletPoints:[e("loseAccessInfo"),e("loseAccessUsage")],acknowledgement:e("acknowledgement"),deleteButton:e("delete")},onDelete:d})})}export{b as DeleteOpenClassroomConfirmationView};
//# sourceMappingURL=DMOPOsrS.chunk.js.map
