import{t as e}from"./jsx-runtime-CiQ1k8xo.js";import{t}from"./clsx-BcPLHiun.js";import{lt as n}from"./vscode-api-DjORcpSo.js";function r({onSelect:e,isDisabled:t=!1}){let n=t||e==null,r=t=>{n||t.defaultPrevented||e?.()},i=t=>{n||t.defaultPrevented||t.currentTarget===t.target&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e?.())};return{role:`button`,tabIndex:n?-1:0,"aria-disabled":n,onClick:r,onKeyDown:i}}var i=n(),a=e();function o(e){let n=(0,i.c)(34),{ariaLabel:o,className:s,icon:c,isSelected:l,onSelect:u,onContextMenu:d,rightText:f,secondaryTitle:p,secondLine:m,secondLineRightText:h,title:g}=e,_;n[0]===u?_=n[1]:(_={onSelect:u},n[0]=u,n[1]=_);let v=r(_),y=l?`bg-token-list-active-selection-background`:`hover:bg-token-list-active-selection-background`,b;n[2]!==s||n[3]!==y?(b=t(`group min-h-10 w-full rounded-lg px-3 py-3 text-base cursor-interaction`,y,`text-left`,s),n[2]=s,n[3]=y,n[4]=b):b=n[4];let x;n[5]===c?x=n[6]:(x=c&&(0,a.jsx)(`span`,{className:`flex min-h-6 shrink-0 items-center`,children:c}),n[5]=c,n[6]=x);let S;n[7]===g?S=n[8]:(S=(0,a.jsx)(`span`,{className:`min-w-0 truncate text-token-foreground`,children:g}),n[7]=g,n[8]=S);let C;n[9]===p?C=n[10]:(C=p==null?null:(0,a.jsx)(`span`,{className:`max-w-48 shrink-0 truncate text-token-description-foreground`,children:p}),n[9]=p,n[10]=C);let w;n[11]!==S||n[12]!==C?(w=(0,a.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline gap-2 text-base leading-6`,children:[S,C]}),n[11]=S,n[12]=C,n[13]=w):w=n[13];let T;n[14]===f?T=n[15]:(T=f==null?null:(0,a.jsx)(`div`,{className:`flex min-h-6 shrink-0 items-center text-base text-token-description-foreground`,children:f}),n[14]=f,n[15]=T);let E;n[16]!==w||n[17]!==T?(E=(0,a.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[w,T]}),n[16]=w,n[17]=T,n[18]=E):E=n[18];let D;n[19]!==m||n[20]!==h?(D=m&&(0,a.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 text-sm leading-[22px] text-token-description-foreground`,children:[(0,a.jsx)(`div`,{className:`min-w-0 flex-1`,children:m}),h&&(0,a.jsx)(`div`,{className:`flex min-h-[22px] shrink-0 items-center`,children:h})]}),n[19]=m,n[20]=h,n[21]=D):D=n[21];let O;n[22]!==D||n[23]!==E?(O=(0,a.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[E,D]}),n[22]=D,n[23]=E,n[24]=O):O=n[24];let k;n[25]!==O||n[26]!==x?(k=(0,a.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[x,O]}),n[25]=O,n[26]=x,n[27]=k):k=n[27];let A;return n[28]!==o||n[29]!==v||n[30]!==d||n[31]!==k||n[32]!==b?(A=(0,a.jsx)(`div`,{"aria-label":o,className:b,onContextMenu:d,...v,children:k}),n[28]=o,n[29]=v,n[30]=d,n[31]=k,n[32]=b,n[33]=A):A=n[33],A}export{r as n,o as t};
//# sourceMappingURL=selectable-list-row-rr2qNwD-.js.map