import{aI as j,bc as P,ao as e,aF as f,L as w,aq as r,bU as c,o as k,p as S,W as v,q as C,E as T,r as g}from"./app-k0jcl5PQ.js";import{u as y}from"./zLT2SRER.chunk.js";import"./_XP6hjk3.chunk.js";import"./9ls1F1Ve.chunk.js";import"./fstW5ZQE.chunk.js";const o="classrooms.revokeOwnership",t=w.encloseNamespace(o);function U(s){const[l,p]=j.useState(!1),{classroom:a,hasLoaded:u,teacherName:n,revoke:h}=y(s.classroomId,s.teacherId),i=P();function m(){p(!0),h(x,d)}function x(){i.success(t("success",{escapeText:!0,teacher:n,classroom:a.name})),k.logUserAction({id:s.teacherId,classroomId:a.id},{actionType:g.Demote,entity:T.User,descriptor:C.Classroom,workflowPhase:v.Complete,location:S.Popup}),s.closePopup()}function d(){i.error(t("error",{escapeText:!0,teacher:n,classroom:a.name})),s.closePopup()}return e.jsxs(f,{closePopup:s.closePopup,title:t("title"),showLoadingSpinner:!u,children:[e.jsx("p",{className:"mb-0",children:e.jsx(r,{namespace:o,phrase:"info",options:{teacher:n}})}),e.jsxs("ul",{children:[e.jsx("li",{children:e.jsx(r,{namespace:o,phrase:"infoPoint1"})}),e.jsx("li",{children:e.jsx(r,{namespace:o,phrase:"infoPoint2"})}),e.jsx("li",{children:e.jsx(r,{namespace:o,phrase:"infoPoint3"})})]}),e.jsxs(c,{children:[e.jsx(c.Cancel,{onClick:s.closePopup}),e.jsx(c.Submit,{onClick:m,variant:"dark",text:t("revoke"),showSpinner:l})]})]})}export{U as RevokeOwnershipView};
//# sourceMappingURL=DioUk-2j.chunk.js.map
