(this.webpackJsonpvertical=this.webpackJsonpvertical||[]).push([[18],{1124:function(e,t,a){},1730:function(e,t,a){"use strict";a.r(t);var s=a(70),r=a(71),n=a(72),o=a(73),c=a(2),l=a(546),i=a(12),m=a(220),d=a(45),u=a(502),w=a(503),p=a(560),P=a(1073),f=a(192),h=a(104),v=(a(1124),a(1)),E=function(e){Object(o.a)(a,e);var t=Object(n.a)(a);function a(e){var r;return Object(s.a)(this,a),(r=t.call(this,e)).t=r.props.t,r.validationSchema=f.e().shape({currentPassword:Object(v.h)(r.t,r.t("controleErrors.required"),{patternType:"alphanumricwithoutspaceandallspecial",message:"alphanumricwithoutspaceandallspecial",spacialChar:null},20,6),newPassword:Object(v.h)(r.t,r.t("controleErrors.required"),{patternType:"alphanumricwithoutspaceandallspecial",message:"alphanumricwithoutspaceandallspecial",spacialChar:null},20,6),confirmPassword:f.g().when("newPassword",{is:function(e){return!!(e&&e.length>0)},then:f.g().oneOf([f.f("newPassword")],r.t("UserProfileManagement.passwordMismatch"))})}),r.resetForm=function(e,t){e({currentPassword:"",newPassword:"",confirmPassword:""}),t({currentPassword:!1,newPassword:!1,confirmPassword:!1}),(r.state.iscurrentPasswordText||r.state.isNewPasswordText||r.state.isRetypePasswordText)&&r.setState({iscurrentPasswordText:!1,isNewPasswordText:!1,isRetypePasswordText:!1})},r.state={iscurrentPasswordText:!1,isNewPasswordText:!1,isRetypePasswordText:!1},r}return Object(r.a)(a,[{key:"componentDidMount",value:function(){this.props.activateAuthLayout()}},{key:"render",value:function(){var e=this,t=this.state,a=t.iscurrentPasswordText,s=t.isNewPasswordText,r=t.isRetypePasswordText;return c.createElement(c.Fragment,null,c.createElement(l.a,{fluid:!0,className:"h-100"},c.createElement("div",{className:"flexLayout"},c.createElement("div",{className:"flexLayout-inner"},c.createElement(P.e,{enableReinitialize:!0,initialValues:{currentPassword:"",newPassword:"",confirmPassword:""},validationSchema:this.validationSchema,onSubmit:function(t,a){var s=a.resetForm;console.log("Values => ",t);var r={currentPassword:t.currentPassword,newPassword:t.newPassword};e.props.changeUserProfilePasswordRequest(r),s()}},(function(t){var n=t.errors,o=t.touched,l=t.dirty,i=t.setValues,m=t.setTouched;return c.createElement(P.d,null,c.createElement(u.a,{className:"userprf"},c.createElement(w.a,{sm:"9"},c.createElement("h6",{className:"mt-0 mb-4"},e.t("UserProfileManagement.passwordDetails")),c.createElement(u.a,null,c.createElement(w.a,null,c.createElement("div",{className:"form-group eyepassword"},c.createElement(p.a,{htmlFor:"example-text-input"},e.t("UserProfileManagement.currentPassword")),c.createElement(P.b,{type:a?"text":"password",name:"currentPassword",placeholder:e.t("UserProfileManagement.currentPassword"),className:"form-control "+(n.currentPassword&&o.currentPassword?"is-invalid":"")}),c.createElement("i",{className:a?"ti-close":"ti-eye",onClick:function(){return e.setState({iscurrentPasswordText:!a})}}),c.createElement(P.a,{name:"currentPassword",component:"div",className:"invalid-feedback"}))),c.createElement(w.a,null,c.createElement("div",{className:"form-group eyepassword"},c.createElement(p.a,{htmlFor:"example-text-input1"},e.t("UserProfileManagement.newPassword")),c.createElement(P.b,{type:s?"text":"password",name:"newPassword",onPaste:function(e){return e.preventDefault()},placeholder:e.t("UserProfileManagement.newPassword"),className:"form-control "+(n.newPassword&&o.newPassword?"is-invalid":"")}),c.createElement("i",{className:s?"ti-close":"ti-eye",onClick:function(){return e.setState({isNewPasswordText:!s})}}),c.createElement(P.a,{name:"newPassword",component:"div",className:"invalid-feedback"}))),c.createElement(w.a,null,c.createElement("div",{className:"form-group eyepassword"},c.createElement(p.a,{htmlFor:"example-text-input2"},e.t("UserProfileManagement.retypenewPassword")),c.createElement(P.b,{type:r?"text":"password",name:"confirmPassword",onPaste:function(e){return e.preventDefault()},placeholder:e.t("UserProfileManagement.retypenewPassword"),className:"form-control "+(n.confirmPassword&&o.confirmPassword?"is-invalid":"")}),c.createElement("i",{className:r?"ti-close":"ti-eye",onClick:function(){return e.setState({isRetypePasswordText:!r})}}),c.createElement(P.a,{name:"confirmPassword",component:"div",className:"invalid-feedback"})))),c.createElement("hr",null),c.createElement("div",{className:"pt-3"},c.createElement("button",{type:"submit",className:"btn btn-primary",disabled:!l},e.t("ActionNames.save")),c.createElement("button",{type:"button",className:"btn btn-cancel ml-3",disabled:!l,onClick:function(){return e.resetForm(i,m)}},e.t("ActionNames.cancel"))))))}))))))}}]),a}(c.Component);t.default=Object(m.g)(Object(h.c)("translations")(Object(d.c)(null,{activateAuthLayout:i.c,changeUserProfilePasswordRequest:i.eb})(E)))}}]);