import{J as e,Kt as t,Mt as n,Q as r,R as i,Tn as a,Y as o,Z as s,at as c,c as l,gn as u,i as d,it as f,n as p,or as m,r as h,st as g}from"./dist-CoD0k1Bd.js";import{t as _}from"./Label-DKn3cyeE.js";import{t as v}from"./Input-C3DwKNOf.js";import{t as y}from"./button-mN_poAXs.js";import{n as b}from"./wayfinder-Dp7PqxvV.js";import{t as x}from"./profile-uNtLFEsD.js";import{t as S}from"./Heading-CCd5Tysh.js";import{t as C}from"./InputError-BY5lDrFd.js";import{t as w}from"./verification-BOcn3HIw.js";var T=e=>({url:T.url(e),method:`get`});T.definition={methods:[`get`,`head`],url:`/settings/profile`},T.url=e=>T.definition.url+b(e),T.get=e=>({url:T.url(e),method:`get`}),T.head=e=>({url:T.url(e),method:`head`});var E=e=>({action:T.url(e),method:`get`});E.get=e=>({action:T.url(e),method:`get`}),E.head=e=>({action:T.url({[e?.mergeQuery?`mergeQuery`:`query`]:{_method:`HEAD`,...e?.query??e?.mergeQuery??{}}}),method:`get`}),T.form=E;var D=e=>({url:D.url(e),method:`patch`});D.definition={methods:[`patch`],url:`/settings/profile`},D.url=e=>D.definition.url+b(e),D.patch=e=>({url:D.url(e),method:`patch`});var O=e=>({action:D.url({[e?.mergeQuery?`mergeQuery`:`query`]:{_method:`PATCH`,...e?.query??e?.mergeQuery??{}}}),method:`post`});O.patch=e=>({action:D.url({[e?.mergeQuery?`mergeQuery`:`query`]:{_method:`PATCH`,...e?.query??e?.mergeQuery??{}}}),method:`post`}),D.form=O;var k=e=>({url:k.url(e),method:`delete`});k.definition={methods:[`delete`],url:`/settings/profile`},k.url=e=>k.definition.url+b(e),k.delete=e=>({url:k.url(e),method:`delete`});var A=e=>({action:k.url({[e?.mergeQuery?`mergeQuery`:`query`]:{_method:`DELETE`,...e?.query??e?.mergeQuery??{}}}),method:`post`});A.delete=e=>({action:k.url({[e?.mergeQuery?`mergeQuery`:`query`]:{_method:`DELETE`,...e?.query??e?.mergeQuery??{}}}),method:`post`}),k.form=A;var j={edit:T,update:D,destroy:k},M=g({__name:`DeleteUser`,setup(e){return u(`passwordInput`),()=>{}}}),N={class:`flex flex-col space-y-6`},P={class:`grid gap-2`},F={class:`grid gap-2`},I={key:0},L={class:`-mt-4 text-sm text-muted-foreground`},R={key:0,class:`mt-2 text-sm font-medium text-green-600`},z={class:`flex items-center gap-4`},B=g({layout:{breadcrumbs:[{title:`Pengaturan Akun`,href:x()}]},__name:`Profile`,setup(u){let g=l(),b=e(()=>g.props.auth.user);return(e,l)=>(t(),r(i,null,[c(m(h),{title:`Profile settings`}),l[5]||=o(`h1`,{class:`sr-only`},`Profil`,-1),o(`div`,N,[c(S,{variant:`small`,title:`Profile`,description:`Update data nama dan email akun anda`}),c(m(p),n(m(j).update.form(),{class:`space-y-6`}),{default:a(({errors:e,processing:n})=>[o(`div`,P,[c(m(_),{for:`name`},{default:a(()=>[...l[0]||=[f(`Nama`,-1)]]),_:1}),c(m(v),{id:`name`,class:`mt-1 block w-full`,name:`name`,"default-value":b.value.name,required:``,autocomplete:`name`,placeholder:`Nama lengkap`},null,8,[`default-value`]),c(C,{class:`mt-2`,message:e.name},null,8,[`message`])]),o(`div`,F,[c(m(_),{for:`email`},{default:a(()=>[...l[1]||=[f(`Email`,-1)]]),_:1}),c(m(v),{id:`email`,type:`email`,class:`mt-1 block w-full`,name:`email`,"default-value":b.value.email,required:``,autocomplete:`username`,placeholder:`Email`},null,8,[`default-value`]),c(C,{class:`mt-2`,message:e.email},null,8,[`message`])]),m(g).props.mustVerifyEmail&&!b.value.email_verified_at?(t(),r(`div`,I,[o(`p`,L,[l[3]||=f(` Your email address is unverified. `,-1),c(m(d),{href:m(w)(),as:`button`,class:`text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500`},{default:a(()=>[...l[2]||=[f(` Klik disini untuk mengirimkan tautan verifikasi baru. `,-1)]]),_:1},8,[`href`])]),m(g).props.status===`verification-link-sent`?(t(),r(`div`,R,` Link verifikasi telah dikirimkan. `)):s(``,!0)])):s(``,!0),o(`div`,z,[c(m(y),{disabled:n,"data-test":`update-profile-button`},{default:a(()=>[...l[4]||=[f(`Simpan`,-1)]]),_:1},8,[`disabled`])])]),_:1},16)]),c(M)],64))}});export{B as default};