import{n as e}from"./rolldown-runtime-Czos8NxU.js";import{Tl as t,vl as n}from"./app-initial~app-main~worktree-init-v2-page~appgen-settings-page~page~appgen-publication-ter~fzo5ij6p-BKVLyD1q.js";import{nx as r,rx as i}from"./app-initial~app-main~new-thread-panel-page-BZHGOlMi.js";function a({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 o=e((()=>{}));function s(e){let t=(0,c.c)(53),{ariaDescribedBy:n,ariaLabel:i,className:o,compactSecondLine:s,hasInteractiveContent:u,icon:d,isSelected:f,onSelect:p,onContextMenu:m,rightText:h,secondaryTitle:g,secondLine:_,secondLineRightText:v,title:y,titleAdornment:b}=e,x=s===void 0?!1:s,S=u===void 0?!1:u,C;t[0]===p?C=t[1]:(C={onSelect:p},t[0]=p,t[1]=C);let w=a(C),T;t[2]===d?T=t[3]:(T=d&&(0,l.jsx)(`span`,{className:`flex min-h-6 shrink-0 items-center`,children:d}),t[2]=d,t[3]=T);let E=x?`gap-0`:`gap-1`,D;t[4]===E?D=t[5]:(D=r(`flex min-w-0 flex-1 flex-col`,E),t[4]=E,t[5]=D);let O;t[6]===y?O=t[7]:(O=(0,l.jsx)(`span`,{className:`min-w-0 truncate text-token-foreground`,children:y}),t[6]=y,t[7]=O);let k;t[8]===g?k=t[9]:(k=g==null?null:(0,l.jsx)(`span`,{className:`max-w-48 shrink-0 truncate text-token-description-foreground`,children:g}),t[8]=g,t[9]=k);let A;t[10]===b?A=t[11]:(A=b==null?null:(0,l.jsx)(`span`,{className:`flex min-w-0 shrink self-center`,children:b}),t[10]=b,t[11]=A);let j;t[12]!==O||t[13]!==k||t[14]!==A?(j=(0,l.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline gap-2 text-base leading-6`,children:[O,k,A]}),t[12]=O,t[13]=k,t[14]=A,t[15]=j):j=t[15];let M;t[16]===h?M=t[17]:(M=h==null?null:(0,l.jsx)(`div`,{className:`flex min-h-6 shrink-0 items-center text-base text-token-description-foreground`,children:h}),t[16]=h,t[17]=M);let N;t[18]!==j||t[19]!==M?(N=(0,l.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[j,M]}),t[18]=j,t[19]=M,t[20]=N):N=t[20];let P;t[21]!==_||t[22]!==v?(P=_&&(0,l.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 text-sm leading-[22px] text-token-description-foreground`,children:[(0,l.jsx)(`div`,{className:`min-w-0 flex-1`,children:_}),v&&(0,l.jsx)(`div`,{className:`flex min-h-[22px] shrink-0 items-center`,children:v})]}),t[21]=_,t[22]=v,t[23]=P):P=t[23];let F;t[24]!==N||t[25]!==P||t[26]!==D?(F=(0,l.jsxs)(`div`,{className:D,children:[N,P]}),t[24]=N,t[25]=P,t[26]=D,t[27]=F):F=t[27];let I;t[28]!==F||t[29]!==T?(I=(0,l.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[T,F]}),t[28]=F,t[29]=T,t[30]=I):I=t[30];let L=I,R,z;if(t[31]!==n||t[32]!==i||t[33]!==o||t[34]!==L||t[35]!==S||t[36]!==f||t[37]!==m||t[38]!==p){z=Symbol.for(`react.early_return_sentinel`);bb0:if(R=r(`group min-h-10 w-full cursor-interaction rounded-lg px-3 py-3 text-left text-base`,f?`bg-token-list-active-selection-background`:`hover:bg-token-list-active-selection-background`,o),S){let e;t[41]!==n||t[42]!==i||t[43]!==p?(e=(0,l.jsx)(`button`,{type:`button`,className:`focus-visible:ring-token-border-focus absolute inset-0 cursor-interaction rounded-lg outline-none focus-visible:ring-2`,"aria-label":i,"aria-describedby":n,onClick:p}),t[41]=n,t[42]=i,t[43]=p,t[44]=e):e=t[44];let a;t[45]===L?a=t[46]:(a=(0,l.jsx)(`div`,{className:`pointer-events-none relative`,children:L}),t[45]=L,t[46]=a),z=(0,l.jsxs)(`div`,{className:r(`relative`,R),onContextMenu:m,children:[e,a]});break bb0}t[31]=n,t[32]=i,t[33]=o,t[34]=L,t[35]=S,t[36]=f,t[37]=m,t[38]=p,t[39]=R,t[40]=z}else R=t[39],z=t[40];if(z!==Symbol.for(`react.early_return_sentinel`))return z;let B;return t[47]!==i||t[48]!==w||t[49]!==L||t[50]!==m||t[51]!==R?(B=(0,l.jsx)(`div`,{"aria-label":i,className:R,onContextMenu:m,...w,children:L}),t[47]=i,t[48]=w,t[49]=L,t[50]=m,t[51]=R,t[52]=B):B=t[52],B}var c,l,u=e((()=>{c=t(),i(),o(),l=n()}));export{a as i,u as n,o as r,s as t};
//# sourceMappingURL=selectable-list-row-CsCnXV1G.js.map