import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{$pt as n,A5 as r,Dvt as i,I1 as a,Jpt as o,L1 as s,Lmt as c,M5 as l,M_t as u,Mvt as d,N8 as f,N_t as p,Nvt as m,O_t as h,P_t as g,QQ as _,Rft as v,Rut as y,Wft as b,Ypt as x,ZQ as S,g8 as C,ggt as w,k8 as T,l_ as E,m2 as D,npt as O,o as k,p8 as ee,s as A,s2 as j,u_ as M,z5 as N,zut as P}from"./app-initial-BHB6SClA.js";import{a as F,r as I}from"./conversation-source-Bjyo78F2.js";import{n as L,r as R}from"./use-hotkey-window-detail-layout-BFpX_mZR.js";import{i as z,n as B,r as V,t as H}from"./local-conversation-stream-role-product-event-C7wWoP3M.js";import{a as U,i as W}from"./local-conversation-thread-Bj5uKwgs.js";function G(){let e=(0,K.c)(31),t=p(ee),r=b(),{conversationId:i}=N(),{clientThreadId:a}=t.value,d=g(f),m;e[0]!==a||e[1]!==d?(m=d==null&&w(a)?a:null,e[0]=a,e[1]=d,e[2]=m):m=e[2];let h=m,v=u(s,h),{data:S}=g(k),C=S==null||S.configuredHotkey!=null,T;e[3]===C?T=e[4]:(T=n(C),e[3]=C,e[4]=T);let D=T,O=u(_,d),A=u(j,d),M;e[5]===A?M=e[6]:(M=E(A?c(A):null),e[5]=A,e[6]=M);let P=M,I=d??h,L;e[7]===I?L=e[8]:(L=I==null?`/`:x(I),e[7]=I,e[8]=L);let z=L,B;e[9]!==a||e[10]!==d?(B=()=>{!w(a)||d==null||y.hotkeyWindowHotkeys?.open({path:o(d)})},e[9]=a,e[10]=d,e[11]=B):B=e[11];let U=(0,q.useEffectEvent)(B),G;e[12]===U?G=e[13]:(G=()=>{U()},e[12]=U,e[13]=G);let Y;e[14]!==a||e[15]!==d?(Y=[a,d],e[14]=a,e[15]=d,e[16]=Y):Y=e[16],(0,q.useEffect)(G,Y),F(t);let X;if(e[17]!==r||e[18]!==z||e[19]!==v?.label||e[20]!==P||e[21]!==i||e[22]!==O?(X=i==null?null:{title:(0,J.jsxs)(`div`,{className:`flex max-w-full min-w-0 items-baseline gap-2`,children:[(0,J.jsx)(`div`,{className:`min-w-0 shrink-[999] truncate text-token-foreground`,children:v?.label??O??r.formatMessage({id:`hotkeyWindow.defaultTitle`,defaultMessage:`Codex`,description:`Fallback title for hotkey window thread header`})}),P==null?null:(0,J.jsx)(`div`,{className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-token-description-foreground`,children:(0,J.jsx)(`span`,{className:`truncate`,children:P})})]}),mainWindowPath:z},e[17]=r,e[18]=z,e[19]=v?.label,e[20]=P,e[21]=i,e[22]=O,e[23]=X):X=e[23],R(X),i==null){let t;return e[24]===D?t=e[25]:(t=(0,J.jsx)(l,{to:D,replace:!0}),e[24]=D,e[25]=t),t}let Z;e[26]===d?Z=e[27]:(Z=d==null?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(H,{conversationId:d}),(0,J.jsx)(V,{conversationId:d})]}),e[26]=d,e[27]=Z);let Q;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,J.jsx)(`div`,{className:`h-full [--padding-panel:calc(var(--padding-panel-base)/2)]`,children:(0,J.jsx)(W,{allowMissingConversation:!0,showUtilityBar:!0})}),e[28]=Q):Q=e[28];let $;return e[29]===Z?$=e[30]:($=(0,J.jsxs)(J.Fragment,{children:[Z,Q]}),e[29]=Z,e[30]=$),$}var K,q,J;e((()=>{K=d(),h(),O(),q=t(m(),1),v(),r(),D(),z(),B(),U(),S(),P(),C(),T(),M(),I(),a(),A(),L(),J=i()}))();export{G as HotkeyWindowThreadPage};
//# sourceMappingURL=hotkey-window-thread-page-CdJ1RF3l.js.map