import{c as w,j as s,L as Q}from"./app-BiexncSX.js";import{H as q}from"./heading-CDALPReo.js";import{B as N}from"./button-Cwvd_D5X.js";import{S as b}from"./separator-BE6xCedb.js";import{u as _,e as S}from"./app-layout-BB5SDrLz.js";import{c as v,t as $}from"./utils-DvRnx1Xn.js";import{q as g}from"./index-DDBh_SM-.js";import{b as P}from"./index-Drs7entj.js";const r=e=>({url:r.url(e),method:"get"});r.definition={methods:["get","head"],url:"/settings/appearance"};r.url=e=>r.definition.url+g(e);r.get=e=>({url:r.url(e),method:"get"});r.head=e=>({url:r.url(e),method:"head"});const p=e=>({action:r.url(e),method:"get"});p.get=e=>({action:r.url(e),method:"get"});p.head=e=>({action:r.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...e?.query??e?.mergeQuery??{}}}),method:"get"});r.form=p;Object.assign(r,r);const l=e=>({url:l.url(e),method:"get"});l.definition={methods:["get","head"],url:"/settings/password"};l.url=e=>l.definition.url+g(e);l.get=e=>({url:l.url(e),method:"get"});l.head=e=>({url:l.url(e),method:"head"});const y=e=>({action:l.url(e),method:"get"});y.get=e=>({action:l.url(e),method:"get"});y.head=e=>({action:l.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...e?.query??e?.mergeQuery??{}}}),method:"get"});l.form=y;const a=e=>({url:a.url(e),method:"put"});a.definition={methods:["put"],url:"/settings/password"};a.url=e=>a.definition.url+g(e);a.put=e=>({url:a.url(e),method:"put"});const x=e=>({action:a.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"PUT",...e?.query??e?.mergeQuery??{}}}),method:"post"});x.put=e=>({action:a.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"PUT",...e?.query??e?.mergeQuery??{}}}),method:"post"});a.form=x;Object.assign(l,l),Object.assign(a,a);const U=[{title:"Profile",href:S(),icon:null},{title:"Password",href:l(),icon:null},{title:"Two-Factor Auth",href:P(),icon:null},{title:"Appearance",href:r(),icon:null}];function B(e){const t=w.c(11),{children:h}=e,{isCurrentUrl:f}=_();if(typeof window>"u")return null;let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(q,{title:"Settings",description:"Manage your profile and account settings"}),t[0]=m):m=t[0];let o;t[1]!==f?(o=U.map((n,j)=>s.jsx(N,{size:"sm",variant:"ghost",asChild:!0,className:v("w-full justify-start",{"bg-muted":f(n.href)}),children:s.jsxs(Q,{href:n.href,children:[n.icon&&s.jsx(n.icon,{className:"h-4 w-4"}),n.title]})},`${$(n.href)}-${j}`)),t[1]=f,t[2]=o):o=t[2];let i;t[3]!==o?(i=s.jsx("aside",{className:"w-full max-w-xl lg:w-48",children:s.jsx("nav",{className:"flex flex-col space-y-1 space-x-0","aria-label":"Settings",children:o})}),t[3]=o,t[4]=i):i=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(b,{className:"my-6 lg:hidden"}),t[5]=d):d=t[5];let u;t[6]!==h?(u=s.jsx("div",{className:"flex-1 md:max-w-2xl",children:s.jsx("section",{className:"max-w-xl space-y-12",children:h})}),t[6]=h,t[7]=u):u=t[7];let c;return t[8]!==i||t[9]!==u?(c=s.jsxs("div",{className:"px-4 py-6",children:[m,s.jsxs("div",{className:"flex flex-col lg:flex-row lg:space-x-12",children:[i,d,u]})]}),t[8]=i,t[9]=u,t[10]=c):c=t[10],c}export{B as S,l as a,r as e};
