import{aw as c,j as a,az as d,ax as n,F as r,b7 as u,aA as t}from"./app-BgLa5dit.js";import{F as m}from"./w68yffRy.chunk.js";const i="shared.changePasswordForm",s=r.encloseNamespace(i);h.defaultProps={submitVariant:"outline-dark",buttonContainerClass:"btn-container d-flex justify-content-end align-items-center",inputWidthClass:"w-100"};function h(e){const l=c();return a.jsxs(d,{children:[!e.hideCurrentPassword&&a.jsx(n,{className:e.inputWidthClass,name:"currentPassword",label:s("currentPassword"),placeholder:s("currentPasswordPlaceholder"),type:"password",autoComplete:"current-password",showRequiredStar:!0}),a.jsx(n,{className:e.inputWidthClass,name:"newPassword",label:s("newPassword"),placeholder:s("newPasswordPlaceholder"),type:"password",autoComplete:"new-password",showRequiredStar:!0}),a.jsx(n,{className:e.inputWidthClass,name:"confirmPassword",label:s("confirmPassword"),placeholder:s("confirmPasswordPlaceholder"),type:"password",autoComplete:"off",showRequiredStar:!0}),e.showChangeOnNextLogin&&a.jsx(n,{id:"changeOnNextLogin",name:"changeOnNextLogin",label:s("changeOnNextLogin"),type:"checkbox",checked:l.values.changeOnNextLogin,checkboxLabelFontWeight:"normal"}),!e.hideButtons&&a.jsxs("div",{className:e.buttonContainerClass,children:[!e.hideCancelButton&&!!e.onClickCancel&&a.jsx("button",{type:"button",className:`btn btn-link me-2 ${e.buttonSize==="lg"?"btn-lg":""}`,onClick:e.onClickCancel,children:a.jsx(u,{namespace:i,phrase:"cancel"})}),a.jsx(m,{isNew:!1,submitText:e.submitText||s("save"),variant:e.submitVariant,size:e.buttonSize})]})]})}const w="userManager.validation",o=r.encloseNamespace(w),P=e=>t.object().shape({newPassword:t.string().required(()=>o("newPasswordRequired")).min(e,()=>o("newPasswordMinLength",{minLen:e})).trim().default(""),confirmPassword:t.string().required(()=>o("confirmPasswordRequired")).oneOf([t.ref("newPassword"),null],()=>o("passwordsDontMatch")).trim().default("")});export{h as C,P as g};
//# sourceMappingURL=kFxxSUq3.chunk.js.map
