(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5031,e=>{"use strict";var s=e.i(43476),r=e.i(71645),t=e.i(18566),a=e.i(92199),i=e.i(33401),o=e.i(39460),n=e.i(59544),l=e.i(66864),c=e.i(9418),d=e.i(17287);e.s(["default",0,function(){let e=(0,t.useRouter)(),{handleUpdatePassword:u,loading:m}=(0,c.default)(),[x,w]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[h,j]=(0,r.useState)(!1),{register:b,errors:P,handleSubmit:y,reset:g}=(0,l.useAppForm)({defaultValues:{currentPassword:"",newPassword:"",confirmPassword:""},schema:d.updatePasswordSchema,onSubmit:async s=>{try{await u(s),g(),e.back()}catch(e){}}});return(0,s.jsx)("div",{className:"mx-auto max-w-188.5 px-4",children:(0,s.jsx)("div",{className:"glass-card-v2 rounded-2xl p-6 md:p-7.5",children:(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsx)("div",{className:"mb-8 flex items-center gap-4",children:(0,s.jsxs)("button",{type:"button",onClick:()=>e.back(),className:"flex cursor-pointer items-center gap-3 text-link-1",children:[(0,s.jsx)(i.BiArrowBack,{size:28}),(0,s.jsx)("h1",{className:"font-body text-lg font-bold leading-8.5 text-heading md:text-xl",children:"Change Password"})]})}),(0,s.jsxs)("form",{onSubmit:y,className:"space-y-7.5",children:[(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(o.default,{name:"currentPassword",label:"Old Password*",type:x?"text":"password",placeholder:"Enter Old Password",register:b("currentPassword"),error:P.currentPassword?.message,icon:(0,s.jsx)(a.FiLock,{size:18}),rightIcon:(0,s.jsx)("button",{type:"button",onClick:()=>w(e=>!e),className:"text-link-1 cursor-pointer",children:x?(0,s.jsx)(a.FiEyeOff,{size:18}):(0,s.jsx)(a.FiEye,{size:18})})}),(0,s.jsx)(o.default,{name:"newPassword",label:"New Password*",type:p?"text":"password",register:b("newPassword"),error:P.newPassword?.message,placeholder:"Enter New Password",icon:(0,s.jsx)(a.FiLock,{size:18}),rightIcon:(0,s.jsx)("button",{type:"button",onClick:()=>f(e=>!e),className:"text-link-1 cursor-pointer",children:p?(0,s.jsx)(a.FiEyeOff,{size:18}):(0,s.jsx)(a.FiEye,{size:18})})}),(0,s.jsx)(o.default,{name:"confirmPassword",label:"Confirm Password*",type:h?"text":"password",register:b("confirmPassword"),error:P.confirmPassword?.message,placeholder:"Confirm Your Password",icon:(0,s.jsx)(a.FiLock,{size:18}),rightIcon:(0,s.jsx)("button",{type:"button",onClick:()=>j(e=>!e),className:"text-link-1 cursor-pointer",children:h?(0,s.jsx)(a.FiEyeOff,{size:18}):(0,s.jsx)(a.FiEye,{size:18})})})]}),(0,s.jsx)(n.default,{type:"submit",className:"w-full",disabled:m,buttonClassName:"w-full",BtnInnerclassName:"!w-full !py-4.5",children:m?"Updating...":"Update Password"})]})]})})})}])}]);