import{aI as m,az as d,c4 as h,bc as x,ao as s,aF as g,L as S,aq as j,bU as o,m as C,o as P}from"./app-k0jcl5PQ.js";import{C as c}from"./_XP6hjk3.chunk.js";const u="classrooms.deleteClassroomGroup",t=S.encloseNamespace(u);function G(e){const[l,n]=m.useState(!1),a=d(c.getClassroomGroup(e.groupId)),i=h(),r=x(),p=()=>{n(!0),C(i,c.deleteGroup(e.groupId,e.classroomId,()=>{n(!1),P.logUserAction({id:e.groupId},e.analyticsOptions),r.success(t("success",{name:a.data.name,escapeText:!0})),e.closePopup()},()=>{r.error(t("error",{name:a.data.name,escapeText:!0}))}))};return s.jsx(g,{title:t("title"),showLoadingSpinner:!a.data,closePopup:e.closePopup,children:a.data&&s.jsxs(s.Fragment,{children:[s.jsx("p",{children:s.jsx(j,{namespace:u,phrase:"areYouSure",options:{name:a.data.name}})}),s.jsxs(o,{children:[s.jsx(o.Cancel,{onClick:e.closePopup}),s.jsx(o.Submit,{onClick:p,variant:"danger",text:t("delete"),showSpinner:l})]})]})})}export{G as DeleteClassroomGroupView};
//# sourceMappingURL=D7yjVlMv.chunk.js.map
