import{ax as l,e9 as g,aI as n,i$ as h,ao as s,aq as c,e3 as x,iO as w,bN as f,L as P,az as m,aj as U,dZ as j,cf as C}from"./app-k0jcl5PQ.js";import{C as L}from"./DiLZz1Ri.chunk.js";import{g as S}from"./CyKu8oTG.chunk.js";import{F as y}from"./C3DvQ1wU.chunk.js";import{u as b,a as A}from"./DaGep5vp.chunk.js";import{S as N}from"./BpDDe8SM.chunk.js";import"./DzRq1F5-.chunk.js";import"./DV1GpLCe.chunk.js";import"./Di9d6zcy.chunk.js";import"./CKctgafI.chunk.js";import"./DLmnDxSd.chunk.js";import"./CW7x8M-z.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";const k="_passWordInput_15uac_1",R={passWordInput:k},d="userManager.bulkUserActionsResetPasswordActionDetails",W={newPassword:"",confirmPassword:"",changeOnNextLogin:!0};function M(t){const e=x();return n.useEffect(()=>{var r,a;t.onUpdate((r=e.values)==null?void 0:r.newPassword,(a=e.values)==null?void 0:a.changeOnNextLogin,e.isValid&&e.dirty)},[e.isValid,e.values]),s.jsx(L,{inputWidthClass:`${R.passWordInput} w-50`,hideButtons:!0,hideCurrentPassword:!0,showChangeOnNextLogin:!0})}function T(t){const[,e]=l(g.BULK_USER_ACTIONS),{disableNext:r,setDisableNext:a}=n.useContext(h);n.useEffect(()=>{a(!0)},[]),n.useEffect(()=>{e("subAction","resetPassword")},[]);function o(i,u,p){p&&r&&a(!1),!p&&!r&&a(!0),e("password",i),e("changeOnNextLogin",u)}return s.jsxs(s.Fragment,{children:[s.jsx("h2",{className:"h4 mb-3",children:s.jsx(c,{namespace:d,phrase:"heading"})}),s.jsx("p",{children:s.jsx(c,{namespace:d,phrase:"info",options:{smartCount:t.totalUsers}})}),s.jsxs("div",{className:"px-2 pt-2 border rounded mb-2 pb-0",children:[s.jsx("ul",{className:"mt-2 ps-3 ms-1",children:s.jsx("li",{children:s.jsx(c,{namespace:d,phrase:"ssoWarning"})})}),s.jsx(y,{initialValues:W,onSubmit:()=>{},validationSchema:S(t.minPasswordLength),children:s.jsx(M,{onUpdate:o})})]})]})}const B="userManager.bulkResetPasswordDetails";function Y(t){const{users:e,count:r}=b(t.userType),a=w(t.userType);f({title:P.getPhrase(B,"pageTitle")});const o=m(U.currentUser()),i=m(o.data&&N.getCustomerSecuritySettings(o.data.customerId)),u=j.getMinimumPasswordLength(i.data,t.userType,C.User);return s.jsx(A,{appLinks:a,userType:t.userType,users:e,currentStep:"action-details",userCount:r,loaded:!0,children:s.jsx(T,{minPasswordLength:u,totalUsers:r,appLinks:a})})}export{Y as BulkUserActionsResetPasswordActionDetailsView};
//# sourceMappingURL=Bbmt63Ur.chunk.js.map
