import{u as j,b as w,j as e}from"./vendor-BKmmeuxg.js";import{I as x}from"./input-error-LaPr_4wd.js";import{C as g}from"./card-D9_SJYq6.js";import{I as m}from"./input-DM0goJrn.js";import{L as p}from"./label-HmIcv5Yx.js";import{L as b}from"./loading-button-BnTVAMJ7.js";const E=()=>{const{props:n}=j(),{email:c}=n.auth.user,{errors:d,translate:o}=n,{auth:s,button:t,input:r}=o,{data:i,setData:u,post:l,processing:h}=w({current_email:c,new_email:""}),a=_=>{u(_.target.name,_.target.value)},f=_=>{_.preventDefault(),l(route("account.change-email"))};return e.jsxs(g,{className:"border-none",children:[e.jsx("div",{className:"border-b-border border-b px-7 pt-7 pb-4",children:e.jsx("p",{className:"text18 font-bold",children:s.change_email})}),e.jsxs("form",{onSubmit:f,className:"px-7 py-8",children:[e.jsxs("div",{children:[e.jsx(p,{children:r.current_email}),e.jsx(m,{required:!0,readOnly:!0,type:"email",name:"current_email",value:i.current_email,placeholder:r.current_email_placeholder}),e.jsx(x,{message:d.current_email,className:"mt-2"})]}),e.jsxs("div",{className:"py-5",children:[e.jsx(p,{children:r.new_email}),e.jsx(m,{required:!0,type:"email",name:"new_email",value:i.new_email,placeholder:r.new_email_placeholder,onChange:a}),e.jsx(x,{message:d.new_email,className:"mt-2"})]}),e.jsx(b,{loading:h,children:t.get_email_change_link})]})]})},I=()=>{const{props:n}=j(),{errors:c,translate:d}=n,{button:o,input:s}=d,{data:t,setData:r,put:i,processing:u}=w({current_password:"",password:"",password_confirmation:""}),l=a=>{r(a.target.name,a.target.value)},h=a=>{a.preventDefault(),i(route("account.change-password"))};return e.jsxs(g,{className:"border-none",children:[e.jsx("div",{className:"border-b-border border-b px-7 pt-7 pb-4",children:e.jsx("p",{className:"text18 font-bold",children:o.change_password})}),e.jsxs("form",{onSubmit:h,className:"flex flex-col gap-5 px-7 py-8",children:[e.jsxs("div",{children:[e.jsx(p,{children:s.current_password}),e.jsx(m,{required:!0,type:"password",name:"current_password",value:t.current_password,placeholder:s.current_password_placeholder,onChange:l}),e.jsx(x,{message:c.current_password,className:"mt-2"})]}),e.jsxs("div",{children:[e.jsx(p,{children:s.new_password}),e.jsx(m,{required:!0,type:"password",name:"password",value:t.password,placeholder:s.new_password_placeholder,onChange:l}),e.jsx(x,{message:c.password,className:"mt-2"})]}),e.jsxs("div",{children:[e.jsx(p,{children:s.confirm_new_password}),e.jsx(m,{required:!0,type:"password",name:"password_confirmation",value:t.password_confirmation,placeholder:s.confirm_new_password,onChange:l})]}),e.jsx("div",{children:e.jsx(b,{loading:u,className:"h-9",children:o.change_password})})]})]})},L=()=>{const{props:n}=j(),{email:c}=n.auth.user,{translate:d}=n,{button:o,input:s}=d,{data:t,post:r,errors:i,clearErrors:u,processing:l}=w({email:c}),h=a=>{a.preventDefault(),u(),r(route("account.forgot-password"))};return e.jsxs(g,{className:"border-none",children:[e.jsx("div",{className:"border-b-border border-b px-7 pt-7 pb-4",children:e.jsx("p",{className:"text18 font-bold",children:o.forget_password})}),e.jsxs("form",{onSubmit:h,className:"px-7 py-8",children:[e.jsxs("div",{children:[e.jsx(p,{children:s.your_email}),e.jsx(m,{readOnly:!0,required:!0,type:"email",value:t.email}),e.jsx(x,{message:i.email,className:"mt-2"})]}),e.jsx(b,{className:"mt-5 h-9",loading:l,children:o.get_password_reset_link})]})]})};export{E as C,L as F,I as a};
