import{u as h,bZ as p,R as o,j as s,b7 as r,G as m,aw as x}from"./app-BgLa5dit.js";import{g as w,C as f}from"./kFxxSUq3.chunk.js";import{W as g}from"./MEkA24R1.chunk.js";const j="_passWordInput_15uac_1",C={passWordInput:j},i="userManager.bulkUserActionsResetPasswordActionDetails",b={newPassword:"",confirmPassword:"",changeOnNextLogin:!0};function P(n){const e=x();return o.useEffect(()=>{var a,t;n.onUpdate((a=e.values)==null?void 0:a.newPassword,(t=e.values)==null?void 0:t.changeOnNextLogin,e.isValid&&e.dirty)},[e.isValid,e.values]),s.jsx(f,{inputWidthClass:`${C.passWordInput} w-50`,hideButtons:!0,hideCurrentPassword:!0,showChangeOnNextLogin:!0})}function L(n){const[,e]=h(p.BULK_USER_ACTIONS),{disableNext:a,setDisableNext:t}=o.useContext(g);o.useEffect(()=>{t(!0)},[]),o.useEffect(()=>{e("subAction","resetPassword")},[]);function u(c,l,d){d&&a&&t(!1),!d&&!a&&t(!0),e("password",c),e("changeOnNextLogin",l)}return s.jsxs(s.Fragment,{children:[s.jsx("h2",{className:"h4 mb-3",children:s.jsx(r,{namespace:i,phrase:"heading"})}),s.jsx("p",{children:s.jsx(r,{namespace:i,phrase:"info",options:{smartCount:n.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(r,{namespace:i,phrase:"ssoWarning"})})}),s.jsx(m,{initialValues:b,onSubmit:()=>{},validationSchema:w(n.minPasswordLength),children:s.jsx(P,{onUpdate:u})})]})]})}export{L as B};
//# sourceMappingURL=CysumXHc.chunk.js.map
