import{aI as S,az as i,aj as g,c4 as C,bc as j,ao as e,aF as f,L as P,aq as v,bU as o,m as I,o as w}from"./app-k0jcl5PQ.js";import{C as m}from"./_XP6hjk3.chunk.js";const d="classrooms.removeStudentsFromClassroom",t=P.encloseNamespace(d);function U(s){var l;const[h,n]=S.useState(!1),c=i(g.currentUser()),a=i(c.data&&m.getClassroom(s.classroomId,c.data.id)),p=C(),r=j(),u={smartCount:s.studentIds.length,classroomName:(l=a.data)==null?void 0:l.name,escapeText:!0};function x(){n(!0),I(p,m.removeStudents(s.studentIds,s.classroomId,()=>{n(!1),w.logUserAction({id:s.classroomId,studentCount:s.studentIds.length},s.analyticsOptions),r.success(t("success",u)),s.closePopup()},()=>{r.error(t("error")),s.closePopup()}))}return e.jsx(f,{title:t("title"),closePopup:s.closePopup,showLoadingSpinner:!a.data,children:a.data&&e.jsxs(e.Fragment,{children:[e.jsx("p",{children:e.jsx(v,{namespace:d,phrase:"confirm",options:u})}),e.jsxs(o,{children:[e.jsx(o.Cancel,{onClick:s.closePopup}),e.jsx(o.Submit,{onClick:x,variant:"danger",text:t("remove"),showSpinner:h})]})]})})}export{U as RemoveStudentsFromClassroomView};
//# sourceMappingURL=CFWuRI-X.chunk.js.map
