import{aI as P,bc as j,ao as s,aF as f,L as w,aq as n,bU as c,o as g,p as S,W as A,q as C,E as T,r as k}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.assignAsOwner",a=w.encloseNamespace(o);function U(e){const[l,p]=P.useState(!1),{classroom:t,hasLoaded:u,teacherName:r,assign:h}=y(e.classroomId,e.teacherId),i=j();function m(){p(!0),h(x,d)}function x(){i.success(a("success",{escapeText:!0,teacher:r,classroom:t.name})),g.logUserAction({id:e.teacherId,classroomId:t.id},{actionType:k.Promote,entity:T.User,descriptor:C.Classroom,workflowPhase:A.Complete,location:S.Popup}),e.closePopup()}function d(){i.error(a("error",{escapeText:!0,teacher:r,classroom:t.name})),e.closePopup()}return s.jsxs(f,{closePopup:e.closePopup,title:a("title"),showLoadingSpinner:!u,children:[s.jsx("p",{className:"mb-0",children:s.jsx(n,{namespace:o,phrase:"info",options:{teacher:r}})}),s.jsxs("ul",{children:[s.jsx("li",{children:s.jsx(n,{namespace:o,phrase:"infoPoint1"})}),s.jsx("li",{children:s.jsx(n,{namespace:o,phrase:"infoPoint2"})}),s.jsx("li",{children:s.jsx(n,{namespace:o,phrase:"infoPoint3"})})]}),s.jsxs(c,{children:[s.jsx(c.Cancel,{onClick:e.closePopup}),s.jsx(c.Submit,{onClick:m,variant:"dark",text:a("assignOwner"),showSpinner:l})]})]})}export{U as AssignAsOwnerView};
//# sourceMappingURL=DhEW17eO.chunk.js.map
