import{aL as m,u as G,bZ as g,R as o,j as e,bA as f,b7 as t,F as j}from"./app-BgLa5dit.js";import{W as y}from"./MEkA24R1.chunk.js";import{B as b}from"./BarWb5sR.chunk.js";const i="userManager.bulkUserActionsChangeYearGroupActionDetails";function S(r){var l,u;const p=m.getValidYearGroups(r.yearGroups),[a,n]=G(g.BULK_USER_ACTIONS);o.useEffect(()=>{n("subAction","changeYearGroup")},[]);const{setDisableNext:d}=o.useContext(y);o.useEffect(()=>{d(!(a!=null&&a.yearGroup))},[a==null?void 0:a.yearGroup]);function x(s){const{value:c}=s.target;if(!c){n("yearGroup",null);return}n("yearGroup",r.yearGroups.find(h=>h.value.toString()===c.toString()))}return e.jsxs(f.Provider,{value:i,children:[e.jsx("h2",{className:"h4 mb-3",children:e.jsx(t,{phrase:"heading"})}),e.jsxs("div",{className:"px-2 pt-2 border rounded mb-2 pb-0",children:[e.jsx("ul",{className:"mt-2 ps-3 ms-1",children:e.jsxs("li",{children:[e.jsx(t,{phrase:"ssoWarning"})," ",!!r.editSsoHelpArticleUrl&&e.jsx("a",{href:r.editSsoHelpArticleUrl,target:"_blank",className:"info-link",children:e.jsx(t,{phrase:"ssoWarningArticle"})})]})}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:e.jsx(t,{phrase:"label"})}),e.jsxs("select",{className:`form-select form-select-lg w-33 ${(l=a.yearGroup)!=null&&l.id?"":"text-secondary"}`,onChange:x,defaultValue:((u=a==null?void 0:a.yearGroup)==null?void 0:u.value)||"",children:[e.jsx("option",{className:"text-secondary",value:"",children:j.getPhrase(i,"placeholder")}),p.map(s=>e.jsx("option",{value:s.value,className:"text-dark",children:s.name},s.id))]})]}),e.jsx(b,{countsByYearGroup:r.countsByYearGroup,yearGroups:r.yearGroups,selectedYearGroup:a.yearGroup})]})]})}export{S as B};
//# sourceMappingURL=CUSWZO44.chunk.js.map
