1import{u as w,G as f,r as u,a as o,F as h,j as r}from"./app.d2295994.js";import{c as g}from"./index.893e1e4b.js";import{A as _}from"./ActionMessage.9242e4e9.js";import{F as v}from"./FormSection.c6372c50.js";import{I as t}from"./InputError.64097cc0.js";import{I as n}from"./InputLabel.e6d91251.js";import{P as N}from"./PrimaryButton.ca1152bb.js";import{T as c}from"./TextInput.148121ec.js";import{u as F}from"./useTranslation.762908c6.js";import"./transition.bf62db2f.js";import"./SectionTitle.f366c39c.js";function k(){const{t:e}=F(),d=w(),s=f({current_password:"",password:"",password_confirmation:""}),p=u.exports.useRef(null),l=u.exports.useRef(null);function i(){s.put(d("user-password.update"),{errorBag:"updatePassword",preserveScroll:!0,onSuccess:()=>s.reset(),onError:()=>{var a,m;s.errors.password&&(s.reset("password","password_confirmation"),(a=p.current)==null||a.focus()),s.errors.current_password&&(s.reset("current_password"),(m=l.current)==null||m.focus())}})}return o(v,{onSubmit:i,title:e("Atualizar senha"),description:e("Certifique-se de que sua conta esteja usando uma senha longa e aleat\xF3ria para permanecer segura."),renderActions:()=>o(h,{children:[r(_,{on:s.recentlySuccessful,className:"mr-3",children:e("Salvo.")}),r(N,{className:g({"opacity-25":s.processing}),disabled:s.processing,children:e("Salvar")})]}),children:[o("div",{className:"col-span-6 sm:col-span-4",children:[r(n,{htmlFor:"current_password",children:e("Senha atual")}),r(c,{id:"current_password",type:"password",className:"mt-1 block w-full",ref:l,value:s.data.current_password,onChange:a=>s.setData("current_password",a.currentTarget.value),autoComplete:"current-password"}),r(t,{message:s.errors.current_password,className:"mt-2"})]}),o("div",{className:"col-span-6 sm:col-span-4",children:[r(n,{htmlFor:"password",children:e("Nova Senha")}),r(c,{id:"password",type:"password",className:"mt-1 block w-full",value:s.data.password,onChange:a=>s.setData("password",a.currentTarget.value),autoComplete:"new-password",ref:p}),r(t,{message:s.errors.password,className:"mt-2"})]}),o("div",{className:"col-span-6 sm:col-span-4",children:[r(n,{htmlFor:"password_confirmation",children:e("Confirme sua senha")}),r(c,{id:"password_confirmation",type:"password",className:"mt-1 block w-full",value:s.data.password_confirmation,onChange:a=>s.setData("password_confirmation",a.currentTarget.value),autoComplete:"new-password"}),r(t,{message:s.errors.password_confirmation,className:"mt-2"})]})]})}export{k as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.