import{u as m,bZ as i,R as l,j as e,bA as d,b7 as o,F as h}from"./app-BgLa5dit.js";import{a as u}from"./BSRfXcBg.chunk.js";import{T as x}from"./DG2-quVR.chunk.js";import{W as g}from"./MEkA24R1.chunk.js";const c="userManager.bulkUserActionsAddToClassroomActionDetails",j=h.encloseNamespace(c);function T(a){const[s,r]=m(i.BULK_USER_ACTIONS);l.useEffect(()=>{r("subAction","addToClassroom")},[]);const{setDisableNext:n}=l.useContext(g);return l.useEffect(()=>{n(!(s!=null&&s.classroom))},[s==null?void 0:s.classroom]),e.jsxs(d.Provider,{value:c,children:[e.jsx("h2",{className:"h4 mb-3",children:e.jsx(o,{phrase:"heading"})}),e.jsx("p",{className:"mb-2",children:e.jsx(o,{phrase:"info"})}),e.jsxs("div",{className:"p-2 border rounded mb-2",children:[e.jsx("label",{children:e.jsx(o,{phrase:"placeholder"})}),s.classroom?e.jsx("div",{className:"d-flex",children:e.jsx(u,{selection:s.classroom,onClickRemove:()=>r("classroom",null)})}):e.jsx("div",{className:"w-50",children:e.jsx(x,{placeholder:j("placeholder"),getRemoteUrl:a.getSearchUrl,requestHeaders:a==null?void 0:a.requestHeaders,selections:s.classroom?[s.classroom]:[],formatRemoteSuggestions:t=>t.results,onSuggestionSelected:t=>r("classroom",t),removeSelection:()=>{},imageCdnUrl:a.imageCdnUrl,activationLength:2,debounceTime:200,errorStateImageUrl:a.errorStateImageUrl,emptyStateImageUrl:a.emptyStateImageUrl})}),a.addToClassroomSupportLink&&e.jsxs("p",{className:"mb-0 mt-2",children:[e.jsx(o,{phrase:"cantFindAClassroom"})," ",e.jsx("a",{href:a.addToClassroomSupportLink,className:"text-info",target:"_blank",children:e.jsx(o,{phrase:"howToCreateClassroom"})})]})]})]})}export{T as B};
//# sourceMappingURL=BnrM8sz2.chunk.js.map
