import{ao as e,aq as a,ei as u,bN as x,L as v,ay as h,p as S,bc as f,aI as l,aZ as j,dL as I,d as b}from"./app-k0jcl5PQ.js";import{D as w,a as L}from"./C9m3Saer.chunk.js";import{S as N}from"./EHuWazu9.chunk.js";import{u as T}from"./Xv5EXWiN.chunk.js";import"./DwDhXSrj.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./ApI7cEru.chunk.js";import"./DXxHdeNz.chunk.js";import"./CpGXOT1_.chunk.js";import"./DkDkjje4.chunk.js";import"./hKqzfsO4.chunk.js";import"./fstW5ZQE.chunk.js";import"./9ls1F1Ve.chunk.js";import"./DRKUY7jf.chunk.js";const r="settings.domainSettingsInvitesToggle";function A(s){const{allowInvites:n,onToggleInvites:t}=s;return e.jsxs("div",{className:"col-12 col-md-7 card p-3",children:[e.jsxs("div",{className:"d-flex justify-content-between",children:[e.jsx("p",{className:"fw-semibold",children:e.jsx(a,{namespace:r,phrase:"invitesLabel"})}),e.jsx(u,{onClick:t,on:n})]}),e.jsx("p",{children:e.jsx(a,{namespace:r,phrase:"invitesDescription"})}),e.jsx("div",{className:"d-flex",children:e.jsx("div",{className:"rounded p-2 bg-light-blue text-info fw-semibold",children:e.jsx(a,{namespace:r,phrase:n?"invitesInfoMessage":"noInvitesInfoMessage"})})})]})}const g="settings.teacherInvites",i=v.encloseNamespace(g);function z(){T(),x({title:i("pageTitle")});const{inviteColleague:s,updateCustomerSetting:n,isLoadingSettings:t}=h(S.Settings),c=f(),[o,m]=l.useState(s);l.useEffect(()=>{t||m(s)},[s,t]);function p(){const d={name:b.InviteColleague,value:!o,kind:I.Setting};n(d,()=>{c.success(i("successAlert")),m(!o)},()=>c.error(i("errorAlert")))}return t?e.jsx(e.Fragment,{}):e.jsxs(N,{heading:i("heading"),breadcrumbs:[i("breadcrumb")],requiredPermissions:j.ManageUsers,children:[e.jsx(w,{active:"teacher-invites",appLinks:L}),e.jsx("p",{children:e.jsx(a,{namespace:g,phrase:"description"})}),e.jsx(A,{allowInvites:o,onToggleInvites:p})]})}export{z as TeacherInvitesView};
//# sourceMappingURL=DY_EKXOS.chunk.js.map
