import{ax as G,e9 as j,iW as p,ao as r,aq as o,ci as A,bN as B,L,az as g,bu as R,aj as Y,iO as N,c4 as v,aG as M,aH as F,m as H,v as W}from"./app-k0jcl5PQ.js";import{B as _}from"./kkYLrCf4.chunk.js";import{W as I}from"./BwaXQJMJ.chunk.js";import{B as J}from"./B7zGk4Xf.chunk.js";import{u as q,a as E}from"./DaGep5vp.chunk.js";import{u as $}from"./VKSuH0OD.chunk.js";import{U as x,A as z}from"./9ls1F1Ve.chunk.js";import{J as O}from"./hKqzfsO4.chunk.js";import"./9ic7OkpL.chunk.js";import"./BDviDDog.chunk.js";import"./wCY37Ze3.chunk.js";import"./DXJ2-V8v.chunk.js";import"./2FvGdRks.chunk.js";import"./BgdsWk2A.chunk.js";import"./BlKMjFEf.chunk.js";import"./CpGXOT1_.chunk.js";import"./DkDkjje4.chunk.js";import"./Djb1f-EX.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./CnmbO5oy.chunk.js";import"./fstW5ZQE.chunk.js";const P="_infoContainer_6m6bk_1",V={infoContainer:P},i="userManager.bulkUserActionsYearGroupRolloverConfirmation";function w(e){const[a]=G(j.BULK_USER_ACTIONS);p.useSetWizardConfirmationCallback(e.onClickConfirm);function u(){const n=a==null?void 0:a.yearGroup;if(!n)return"";const s=e.yearGroups.filter(t=>t.value>=n.value);if(s.length===1)return n.name;if(s.length===2)return`${s[0].name} and ${s[1].name}`;const c=s.splice(s.length-1);return`${s.map(t=>t.name).join(", ")}, and ${c[0].name}`}return r.jsxs(r.Fragment,{children:[r.jsxs(I,{children:[r.jsx("p",{className:"fw-semibold",children:r.jsx(o,{namespace:i,phrase:"heading"})}),r.jsxs("ul",{children:[r.jsx("li",{children:r.jsx(o,{namespace:i,phrase:"info"})}),r.jsxs("li",{children:[r.jsx(o,{namespace:i,phrase:"ssoWarning"})," ",!!e.editSsoHelpArticleUrl&&r.jsx("a",{href:e.editSsoHelpArticleUrl,target:"_blank",className:"info-link",children:r.jsx(o,{namespace:i,phrase:"ssoWarningArticle"})})]}),r.jsx("li",{className:"text-danger",children:r.jsx(o,{namespace:i,phrase:"warning",options:{yearGroupList:u()}})})]}),r.jsx("div",{className:`${V.infoContainer} rounded-3 p-2`,children:r.jsx(J,{yearGroups:e.yearGroups,graduatingYearGroup:a==null?void 0:a.yearGroup,countsByYearGroup:e.countsByYearGroup})})]}),r.jsx(_,{users:e.users,imageCdnUrl:e.imageCdnUrl,statuses:[A.Active,A.Inactive],hasMore:e.hasMoreUsers,isFetching:e.isFetchingUsers,fetchNext:e.fetchNextUserPage,userType:e.userType,userCount:e.userCount})]})}const K="userManager.yearGroupRolloverConfirmation";function Ce(e){var y;const{users:a,count:u,isFetching:n,hasMore:s,fetchNext:c}=q(e.userType),[t]=G(j.BULK_USER_ACTIONS);B({title:L.getPhrase(K,"pageTitle")});const d=g(R.config()),l=g(Y.currentUser()),f=g(!!l.data&&x.yearGroups(l.data.customerId)),h=$({userType:e.userType,field:z.YearGroupValues,getSearchAggregation:x.getSearchAggregation}),U=N(e.userType),S=v(),k=p.useCreateJobErrorAlert();function T(){if(!t)return;const m=p.getCreateJobRequestData(t,l.data.customerId,e.userType);H(S,O.createJob(m,b,k))}function b(m){W.trigger({...U.bulkActionsStatus.polling,params:{userType:e.userType,jobId:m.id}})}const C=!!f.data&&!!d.data&&!!h;return r.jsx(E,{appLinks:U,userType:e.userType,users:a,currentStep:"confirmation",userCount:u,loaded:C,children:C&&r.jsx(w,{users:a,imageCdnUrl:(y=d.data)==null?void 0:y.imageCdnUrl,hasMoreUsers:s,isFetchingUsers:n,fetchNextUserPage:c,userType:e.userType,onClickConfirm:T,userCount:u,yearGroups:f.data,countsByYearGroup:h,editSsoHelpArticleUrl:M.getLiteArticle(F.EditSsoAccounts)})})}export{Ce as BulkUserActionsYearGroupRolloverConfirmationView};
//# sourceMappingURL=BB3OyMGn.chunk.js.map
