import{T as u,h as _,c as w,a as t,b as s,t as l,w as f,d as i,v as d,u as a,j as b,g,o as h,k as v,q as y}from"./app-13978987.js";import{_ as p}from"./InputFieldError-52549d23.js";import{_ as C}from"./UserLayout-6a50516d.js";import{_ as P}from"./SpinnerBtn-cb152833.js";import{_ as V}from"./PageHeader-8c638686.js";import"./dropdown-45d66330.js";const k={class:"container flex-grow p-4 sm:p-6"},x={class:"card card-body mx-auto max-w-3xl"},N={class:"mb-4"},$={class:"label mb-1"},B={class:"label mb-1"},S={class:"label mb-1"},T={class:"flex items-center gap-3"},U=g({layout:C}),z=Object.assign(U,{__name:"PasswordChange",props:["segments"],setup(j){const e=u({current_password:"",new_password:"",new_password_confirmation:""}),m=()=>{e.put(route("user.update-password"),{onSuccess:()=>{y.success(trans("password has been updated successfully")),e.reset()}})};return(o,n)=>{const c=_("Link");return h(),w("main",k,[t(V,{title:"Change Password",buttons:[]}),s("div",x,[s("h4",N,l(o.trans("Change Password")),1),s("form",{onSubmit:f(m,["prevent"]),class:"space-y-6"},[s("div",null,[s("label",$,l(o.trans("Old Password"))+" *",1),i(s("input",{class:"input",type:"password","onUpdate:modelValue":n[0]||(n[0]=r=>a(e).current_password=r)},null,512),[[d,a(e).current_password]]),t(p,{message:a(e).errors.current_password},null,8,["message"])]),s("div",null,[s("label",B,l(o.trans("New Password"))+" *",1),i(s("input",{class:"input",type:"password","onUpdate:modelValue":n[1]||(n[1]=r=>a(e).new_password=r)},null,512),[[d,a(e).new_password]]),t(p,{message:a(e).errors.new_password},null,8,["message"])]),s("div",null,[s("label",S,l(o.trans("Confirm Password"))+" *",1),i(s("input",{class:"input",type:"password","onUpdate:modelValue":n[2]||(n[2]=r=>a(e).new_password_confirmation=r)},null,512),[[d,a(e).new_password_confirmation]]),t(p,{message:a(e).errors.new_password_confirmation},null,8,["message"])]),s("div",T,[t(P,{processing:a(e).processing,classes:"btn btn-primary","btn-text":o.trans("Change Password")},null,8,["processing","btn-text"]),t(c,{href:o.route("user.account-settings"),class:"btn btn-danger"},{default:b(()=>[v(l(o.trans("Cancel")),1)]),_:1},8,["href"])])],32)])])}}});export{z as default};
