import{ax as U,e9 as A,iW as c,ao as r,aO as B,aq as i,ci as f,bN as L,L as N,az as u,aj as Y,bu as M,c4 as H,iO as R,aG as W,aH as _,m as F,v as I}from"./app-k0jcl5PQ.js";import{B as J}from"./kkYLrCf4.chunk.js";import{W as q}from"./BwaXQJMJ.chunk.js";import{B as E}from"./Dh0S4UG3.chunk.js";import{u as v,a as O}from"./DaGep5vp.chunk.js";import{u as P}from"./VKSuH0OD.chunk.js";import{U as C,A as z}from"./9ls1F1Ve.chunk.js";import{J as V}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 K="_infoContainer_6m6bk_1",D={infoContainer:K},t="userManager.bulkUserActionsChangeYearGroupConfirmation";function $(e){var a;const[s]=U(A.BULK_USER_ACTIONS);return c.useSetWizardConfirmationCallback(e.onClickConfirm),r.jsxs(B.Provider,{value:t,children:[r.jsxs(q,{children:[r.jsxs("ul",{className:"mt-1 ps-3 ms-1",children:[r.jsx("li",{children:r.jsx(i,{namespace:t,phrase:"heading",options:{smartCount:e.userCount,yearGroup:((a=s==null?void 0:s.yearGroup)==null?void 0:a.name)??""}})}),r.jsxs("li",{children:[r.jsx(i,{namespace:t,phrase:"ssoWarning"})," ",!!e.editSsoHelpArticleUrl&&r.jsx("a",{href:e.editSsoHelpArticleUrl,target:"_blank",className:"info-link",children:r.jsx(i,{namespace:t,phrase:"ssoWarningArticle"})})]})]}),r.jsx("div",{className:`${D.infoContainer} rounded-3 p-2`,children:r.jsx(E,{yearGroups:e.yearGroups,selectedYearGroup:s==null?void 0:s.yearGroup,countsByYearGroup:e.countsByYearGroup})})]}),r.jsx(J,{users:e.users,imageCdnUrl:e.imageCdnUrl,statuses:[f.Active,f.Inactive],hasMore:e.hasMoreUsers,isFetching:e.isFetchingUsers,fetchNext:e.fetchNextUserPage,userType:e.userType,userCount:e.userCount})]})}const w="userManager.bulkChangeYearGroupConfirmation";function Ae(e){var h;const{users:s,count:a,isFetching:y,hasMore:x,fetchNext:k}=v(e.userType),[l]=U(A.BULK_USER_ACTIONS);L({title:N.getPhrase(w,"pageTitle")});const n=u(Y.currentUser()),G=u(M.config()),m=u(n.data&&C.yearGroups(n.data.customerId)),g=P({userType:e.userType,field:z.YearGroupValues,getSearchAggregation:C.getSearchAggregation}),S=H(),p=R(e.userType),j=c.useCreateJobErrorAlert();function T(){if(!l)return;const o=c.getCreateJobRequestData(l,n.data.customerId,e.userType);F(S,V.createJob(o,b,j))}function b(o){I.trigger({...p.bulkActionsStatus.polling,params:{userType:e.userType,jobId:o.id}})}const d=!!g&&!!m.data;return r.jsx(O,{appLinks:p,userType:e.userType,users:s,currentStep:"confirmation",userCount:a,loaded:d,children:d&&r.jsx($,{users:s,imageCdnUrl:(h=G.data)==null?void 0:h.imageCdnUrl,hasMoreUsers:x,isFetchingUsers:y,fetchNextUserPage:k,userType:e.userType,onClickConfirm:T,userCount:a,countsByYearGroup:g,yearGroups:m.data,editSsoHelpArticleUrl:W.getLiteArticle(_.EditSsoAccounts)})})}export{Ae as BulkUserActionsChangeYearGroupConfirmationView};
//# sourceMappingURL=B-ymFiSQ.chunk.js.map
