import{t as e}from"./jsx-runtime-CiQ1k8xo.js";import{t}from"./clsx-BcPLHiun.js";import{lt as n}from"./vscode-api-DjORcpSo.js";import{t as r}from"./chevron-AEenlp4G.js";var i=n(),a=e(),o={default:`px-4 py-3`,compact:`p-2`,extraCompact:`p-1.5`},s={default:`py-3 pr-10 pl-4`,compact:`py-2 pr-8 pl-2`,extraCompact:`py-1.5 pr-10 pl-1.5`},c={default:`text-size-chat-sm`,medium:`text-base`,toolbar:`h-token-button-composer text-base leading-[18px]`},l={default:`px-2 py-1`,medium:`px-4 py-1.5`,toolbar:`px-2 py-0`};function u(e){let n=(0,i.c)(8),{as:r,children:o,className:s}=e,c=r===void 0?`div`:r,l;n[0]===s?l=n[1]:(l=t(`flex max-w-full flex-col overflow-hidden rounded-lg border border-token-border bg-token-dropdown-background/50 text-token-foreground shadow-sm extension:bg-token-input-background/50`,s),n[0]=s,n[1]=l);let u=l;if(c===`span`){let e;return n[2]!==o||n[3]!==u?(e=(0,a.jsx)(`span`,{className:u,children:o}),n[2]=o,n[3]=u,n[4]=e):e=n[4],e}let d;return n[5]!==o||n[6]!==u?(d=(0,a.jsx)(`div`,{className:u,children:o}),n[5]=o,n[6]=u,n[7]=d):d=n[7],d}function d(e){let n=(0,i.c)(16),{className:r,icon:c,padding:l,reserveTrailingSpace:u,subtitle:d,title:f,titleTooltip:p,trailing:m}=e,h=l===void 0?`default`:l,g=u!==void 0&&u?s[h]:o[h],_;n[0]!==r||n[1]!==g?(_=t(`flex min-w-0 items-center gap-2.5 text-left`,g,r),n[0]=r,n[1]=g,n[2]=_):_=n[2];let v;n[3]!==f||n[4]!==p?(v=(0,a.jsx)(`span`,{className:`text-size-chat truncate font-medium text-token-foreground`,title:p,children:f}),n[3]=f,n[4]=p,n[5]=v):v=n[5];let y;n[6]===d?y=n[7]:(y=d==null?null:(0,a.jsx)(`span`,{className:`text-size-chat-sm truncate text-token-text-secondary`,children:d}),n[6]=d,n[7]=y);let b;n[8]!==v||n[9]!==y?(b=(0,a.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[v,y]}),n[8]=v,n[9]=y,n[10]=b):b=n[10];let x;return n[11]!==c||n[12]!==_||n[13]!==b||n[14]!==m?(x=(0,a.jsxs)(`span`,{className:_,children:[c,b,m]}),n[11]=c,n[12]=_,n[13]=b,n[14]=m,n[15]=x):x=n[15],x}function f(e){let n=(0,i.c)(13),{label:o,matchDropdownWidth:s,matchDropdownWidthLabel:u,size:d,showChevron:f}=e,p=s===void 0?!1:s,m=d===void 0?`default`:d,h=f===void 0?!1:f,g=c[m],_;n[0]===g?_=n[1]:(_=t(`flex shrink-0 items-center overflow-hidden rounded-lg border border-token-border text-token-foreground`,g),n[0]=g,n[1]=_);let v;n[2]!==o||n[3]!==p||n[4]!==u||n[5]!==m?(v=p?(0,a.jsxs)(`span`,{className:t(`grid`,l[m]),children:[(0,a.jsxs)(`span`,{"aria-hidden":!0,className:`invisible col-start-1 row-start-1 flex items-center gap-1`,children:[u??o,(0,a.jsx)(r,{className:`icon-2xs shrink-0`})]}),(0,a.jsx)(`span`,{className:`col-start-1 row-start-1 flex items-center justify-center`,children:o})]}):(0,a.jsx)(`span`,{className:t(`flex items-center font-medium`,l[m]),children:o}),n[2]=o,n[3]=p,n[4]=u,n[5]=m,n[6]=v):v=n[6];let y;n[7]===h?y=n[8]:(y=h?(0,a.jsx)(`span`,{className:`flex self-stretch border-l border-token-border px-1.5`,children:(0,a.jsx)(r,{className:`icon-2xs self-center text-token-text-tertiary`})}):null,n[7]=h,n[8]=y);let b;return n[9]!==_||n[10]!==v||n[11]!==y?(b=(0,a.jsxs)(`span`,{className:_,children:[v,y]}),n[9]=_,n[10]=v,n[11]=y,n[12]=b):b=n[12],b}function p(e){let n=(0,i.c)(9),{children:o,isExpanded:s,onClick:c}=e,l=s&&`rotate-180`,u;n[0]===l?u=n[1]:(u=t(`icon-xs`,l),n[0]=l,n[1]=u);let d;n[2]===u?d=n[3]:(d=(0,a.jsx)(r,{className:u}),n[2]=u,n[3]=d);let f;return n[4]!==o||n[5]!==s||n[6]!==c||n[7]!==d?(f=(0,a.jsxs)(`button`,{type:`button`,"aria-expanded":s,className:`text-size-chat flex h-10 cursor-interaction items-center justify-center gap-1 text-token-text-tertiary hover:bg-token-list-hover-background/30 focus-visible:ring-1 focus-visible:ring-token-focus-border focus-visible:outline-none focus-visible:ring-inset`,onClick:c,children:[o,d]}),n[4]=o,n[5]=s,n[6]=c,n[7]=d,n[8]=f):f=n[8],f}export{d as i,p as n,f as r,u as t};
//# sourceMappingURL=thread-resource-card-Bzt36Zw4.js.map