import{d as P,aT as F,W as N,a3 as e,bK as r,a2 as l,bh as n,u as a,X as V,bP as $}from"./vendor-reka-Edfq1EPl.js";import{useForm as g}from"./vendor/inertia-CR4tWtMT.js";import{g as T,n as D,d as y}from"./registry-DyIszw9-.js";import{_ as x,a as v,b as S,c as U}from"./CardContent.vue_vue_type_script_setup_true_lang-DPd7KJ8I.js";import{_ as k}from"./CardDescription.vue_vue_type_script_setup_true_lang-Ds2CuvUf.js";import{_ as B}from"./CardFooter.vue_vue_type_script_setup_true_lang-N61eYvGN.js";import{_ as m,a as i,b as c}from"./FormMessage.vue_vue_type_script_setup_true_lang-CIPMOSQA.js";import{_ as p}from"./Input.vue_vue_type_script_setup_true_lang-D6nVx0lb.js";import{_ as E}from"./Separator.vue_vue_type_script_setup_true_lang-DUZUvasE.js";const K={class:"space-y-6"},J=P({__name:"Show",props:{user:{}},setup(C){const _=C,f=T(),{t:o}=D(),u=g({name:_.user.name,email:_.user.email}),s=g({current_password:"",password:"",password_confirmation:""});function w(){u.put(`/${f}/account`)}function b(){s.put(`/${f}/account/password`,{onSuccess:()=>{s.reset()}})}return(M,t)=>(F(),N("div",K,[e(U,null,{default:r(()=>[e(x,null,{default:r(()=>[e(v,null,{default:r(()=>[l(n(a(o)("builder.account.profile")),1)]),_:1}),e(k,null,{default:r(()=>[l(n(a(o)("builder.account.profile_description")),1)]),_:1})]),_:1}),e(S,null,{default:r(()=>[V("form",{class:"space-y-4",onSubmit:$(w,["prevent"])},[e(m,null,{default:r(()=>[e(i,{error:!!a(u).errors.name,for:"name"},{default:r(()=>[l(n(a(o)("builder.account.name")),1)]),_:1},8,["error"]),e(p,{id:"name",modelValue:a(u).name,"onUpdate:modelValue":t[0]||(t[0]=d=>a(u).name=d),type:"text",name:"name",autocomplete:"name"},null,8,["modelValue"]),e(c,{message:a(u).errors.name},null,8,["message"])]),_:1}),e(m,null,{default:r(()=>[e(i,{error:!!a(u).errors.email,for:"email"},{default:r(()=>[l(n(a(o)("builder.account.email")),1)]),_:1},8,["error"]),e(p,{id:"email",modelValue:a(u).email,"onUpdate:modelValue":t[1]||(t[1]=d=>a(u).email=d),type:"email",name:"email",autocomplete:"email"},null,8,["modelValue"]),e(c,{message:a(u).errors.email},null,8,["message"])]),_:1})],32)]),_:1}),e(B,null,{default:r(()=>[e(y,{disabled:a(u).processing,onClick:w},{default:r(()=>[l(n(a(o)("builder.account.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1}),e(E),e(U,null,{default:r(()=>[e(x,null,{default:r(()=>[e(v,null,{default:r(()=>[l(n(a(o)("builder.account.password")),1)]),_:1}),e(k,null,{default:r(()=>[l(n(a(o)("builder.account.password_description")),1)]),_:1})]),_:1}),e(S,null,{default:r(()=>[V("form",{class:"space-y-4",onSubmit:$(b,["prevent"])},[e(m,null,{default:r(()=>[e(i,{error:!!a(s).errors.current_password,for:"current_password"},{default:r(()=>[l(n(a(o)("builder.account.current_password")),1)]),_:1},8,["error"]),e(p,{id:"current_password",modelValue:a(s).current_password,"onUpdate:modelValue":t[2]||(t[2]=d=>a(s).current_password=d),type:"password",name:"current_password",autocomplete:"current-password"},null,8,["modelValue"]),e(c,{message:a(s).errors.current_password},null,8,["message"])]),_:1}),e(m,null,{default:r(()=>[e(i,{error:!!a(s).errors.password,for:"new_password"},{default:r(()=>[l(n(a(o)("builder.account.new_password")),1)]),_:1},8,["error"]),e(p,{id:"new_password",modelValue:a(s).password,"onUpdate:modelValue":t[3]||(t[3]=d=>a(s).password=d),type:"password",name:"password",autocomplete:"new-password"},null,8,["modelValue"]),e(c,{message:a(s).errors.password},null,8,["message"])]),_:1}),e(m,null,{default:r(()=>[e(i,{for:"password_confirmation"},{default:r(()=>[l(n(a(o)("builder.account.confirm_password")),1)]),_:1}),e(p,{id:"password_confirmation",modelValue:a(s).password_confirmation,"onUpdate:modelValue":t[4]||(t[4]=d=>a(s).password_confirmation=d),type:"password",name:"password_confirmation",autocomplete:"new-password"},null,8,["modelValue"])]),_:1})],32)]),_:1}),e(B,null,{default:r(()=>[e(y,{disabled:a(s).processing,onClick:b},{default:r(()=>[l(n(a(o)("builder.account.update_password")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]))}});export{J as default};
