import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,t as n}from"./jsx-runtime-CiQ1k8xo.js";import{t as r}from"./clsx-BcPLHiun.js";import{lt as i}from"./vscode-api-DjORcpSo.js";var a=i(),o=e(t(),1),s=n(),c=(0,o.createContext)(null);function l(e){let t=(0,a.c)(51),n,i,l,u,d,f,p,m,h,g,_,v,y;t[0]===e?(n=t[1],i=t[2],l=t[3],u=t[4],d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],v=t[12],y=t[13]):({title:v,backSlot:i,subtitle:m,children:l,fullWidth:g,contentClassName:d,subtitleClassName:h,titleStackClassName:y,action:n,actionPlacement:_,ref:f,className:u,...p}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=l,t[4]=u,t[5]=d,t[6]=f,t[7]=p,t[8]=m,t[9]=h,t[10]=g,t[11]=_,t[12]=v,t[13]=y);let b=g===void 0?!1:g,x=_===void 0?`header`:_,S=(0,o.useContext)(c),C=S?.targetId??null,w=S?.navigationKey??null,T;t[14]===C?T=t[15]:(T=()=>{C!=null&&document.getElementById(C)?.scrollIntoView?.({block:`center`})},t[14]=C,t[15]=T);let E;t[16]!==w||t[17]!==C?(E=[w,C],t[16]=w,t[17]=C,t[18]=E):E=t[18],(0,o.useLayoutEffect)(T,E);let D;t[19]===v?D=t[20]:(D=v?(0,s.jsx)(`div`,{className:`electron:heading-lg heading-base truncate`,children:v}):null,t[19]=v,t[20]=D);let O=D,k;t[21]!==m||t[22]!==h?(k=m?(0,s.jsx)(`div`,{className:r(`text-base text-token-text-secondary`,h??`truncate`),children:m}):null,t[21]=m,t[22]=h,t[23]=k):k=t[23];let A=k,j;t[24]!==n||t[25]!==x||t[26]!==m||t[27]!==A||t[28]!==v||t[29]!==O||t[30]!==y?(j=!v&&!m&&!n?null:x===`subtitle`&&A?(0,s.jsx)(`div`,{className:`pb-panel`,children:(0,s.jsxs)(`div`,{className:r(`flex min-w-0 flex-col`,y??`gap-1.5 pb-panel`),children:[O,(0,s.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,s.jsx)(`div`,{className:`min-w-0 flex-1`,children:A}),n?(0,s.jsx)(`div`,{className:`shrink-0`,children:n}):null]})]})}):(0,s.jsxs)(`div`,{className:`flex items-center justify-between gap-3 pb-panel`,children:[(0,s.jsxs)(`div`,{className:r(`flex min-w-0 flex-1 flex-col`,y??`gap-1.5 pb-panel`),children:[O,A]}),n?(0,s.jsx)(`div`,{className:`shrink-0`,children:n}):null]}),t[24]=n,t[25]=x,t[26]=m,t[27]=A,t[28]=v,t[29]=O,t[30]=y,t[31]=j):j=t[31];let M=j,N;t[32]===u?N=t[33]:(N=r(`main-surface flex h-full min-h-0 flex-col`,u),t[32]=u,t[33]=N);let P;t[34]===i?P=t[35]:(P=(0,s.jsx)(`div`,{className:`draggable flex items-center px-panel electron:h-toolbar extension:h-toolbar-sm`,children:i}),t[34]=i,t[35]=P);let F=b?null:`max-w-2xl electron:min-w-[calc(320px*var(--codex-window-zoom))]`,I;t[36]!==d||t[37]!==F?(I=r(`mx-auto flex w-full flex-col`,F,d),t[36]=d,t[37]=F,t[38]=I):I=t[38];let L;t[39]===l?L=t[40]:(L=(0,s.jsx)(`div`,{className:`flex flex-col gap-[var(--padding-panel)]`,children:l}),t[39]=l,t[40]=L);let R;t[41]!==I||t[42]!==L||t[43]!==M?(R=(0,s.jsx)(`div`,{className:`scrollbar-stable flex-1 overflow-y-auto p-panel`,children:(0,s.jsxs)(`div`,{className:I,children:[M,L]})}),t[41]=I,t[42]=L,t[43]=M,t[44]=R):R=t[44];let z;return t[45]!==f||t[46]!==p||t[47]!==R||t[48]!==N||t[49]!==P?(z=(0,s.jsxs)(`div`,{ref:f,className:N,...p,children:[P,R]}),t[45]=f,t[46]=p,t[47]=R,t[48]=N,t[49]=P,t[50]=z):z=t[50],z}function u(e){let t=(0,a.c)(6),{children:n,navigationKey:r,targetId:i}=e,o;t[0]!==r||t[1]!==i?(o=i==null?null:{navigationKey:r,targetId:i},t[0]=r,t[1]=i,t[2]=o):o=t[2];let l;return t[3]!==n||t[4]!==o?(l=(0,s.jsx)(c.Provider,{value:o,children:n}),t[3]=n,t[4]=o,t[5]=l):l=t[5],l}export{u as n,l as t};
//# sourceMappingURL=settings-content-layout-Dm8iYKt_.js.map