(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93315,s=>{"use strict";var e=s.i(843476),r=s.i(653480),i=s.i(670284);s.i(787248);var o=s.i(14797);s.i(785269);var a=s.i(322831);s.i(130306);var t=s.i(71228),l=s.i(499683),d=s.i(653145),n=s.i(880202);s.i(875602);var u=s.i(986282);let c=l.object({password:l.string().required(),password_confirmation:l.string().nullable().oneOf([l.ref("password"),null])});s.s([],132045),s.i(132045),s.s(["default",0,({onSuccess:s})=>{let{t:l}=(0,a.useTranslation)(),{mutate:p,isLoading:m}=(0,r.useMutation)({mutationFn:s=>i.userService.updatePassword(s),onError:s=>{(0,o.error)(s.message)}}),{register:f,handleSubmit:v,formState:{errors:w}}=(0,d.useForm)({resolver:(0,n.yupResolver)(c)});return(0,e.jsxs)("div",{className:"p-5",children:[(0,e.jsx)("div",{className:"text-xl font-bold mb-8",children:l("update.password")}),(0,e.jsx)("form",{onSubmit:v(e=>{p(e,{onSuccess:()=>{(0,o.success)(l("successfully.updated")),s()}})}),children:(0,e.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,e.jsx)(t.Input,{type:"password",fullWidth:!0,label:l("password"),...f("password"),error:w.password?.message,required:!0}),(0,e.jsx)(t.Input,{type:"password",label:l("confirm.password"),fullWidth:!0,...f("password_confirmation"),error:w.password_confirmation?.message,required:!0}),(0,e.jsx)(u.Button,{loading:m,type:"submit",fullWidth:!0,children:l("save")})]})})]})}],93315)},835211,s=>{s.n(s.i(93315))}]);