import{e as _,R as k,j as n,bj as D,bi as C,bh as I,bf as M,bd as S}from"./vendor-.bun-CIlawBoH.js";import{u as z,m as w,I as O}from"./useAppFontEffects-DkrfZHQv.js";import{M as P}from"./main-gqEqIL1b.js";import"./index-DkRLSXEX.js";import"./NewWorktreeDialog-B2o615D_.js";import"./mobileLayoutPreference-Dio-WWkI.js";import"./SessionSwitcherDropdown-Bz03hrU9.js";const G=R=>{const e=_.c(33),{open:y,onOpenChange:t,initialPrompt:j}=R,i=k.useId(),{t:o}=z(),N=B;let s;e[0]!==t?(s=v=>{!v&&N()||t(v)},e[0]=t,e[1]=s):s=e[1];let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(D,{className:w("fixed inset-0 z-50 bg-black/50 dark:bg-black/75","transition-opacity duration-150 ease-out","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0")}),e[2]=h):h=e[2];let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=w("relative pointer-events-auto","w-[90vw] max-w-[720px] h-[680px] max-h-[85vh]","flex flex-col rounded-xl border shadow-none overflow-hidden origin-center","bg-background","transition-all duration-150 ease-out","data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]","data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]"),e[3]=x):x=e[3];let a;e[4]!==t?(a=()=>t(!1),e[4]=t,e[5]=a):a=e[5];let l;e[6]!==o?(l=o("multiRun.window.actions.closeAria"),e[6]=o,e[7]=l):l=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(O,{name:"close",className:"h-5 w-5"}),e[8]=b):b=e[8];let r;e[9]!==a||e[10]!==l?(r=n.jsx("div",{className:"absolute right-0.5 top-0.5 z-50",children:n.jsx("button",{type:"button",onClick:a,"aria-label":l,className:"inline-flex h-7 w-7 items-center justify-center rounded-md p-0.5 text-muted-foreground hover:text-foreground hover:bg-interactive-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:b})}),e[9]=a,e[10]=l,e[11]=r):r=e[11];let c;e[12]!==o?(c=o("multiRun.window.description"),e[12]=o,e[13]=c):c=e[13];let d;e[14]!==i||e[15]!==c?(d=n.jsx(C,{id:i,className:"sr-only",children:c}),e[14]=i,e[15]=c,e[16]=d):d=e[16];let u,m;e[17]!==t?(u=()=>t(!1),m=()=>t(!1),e[17]=t,e[18]=u,e[19]=m):(u=e[18],m=e[19]);let f;e[20]!==j||e[21]!==u||e[22]!==m?(f=n.jsx(P,{initialPrompt:j,onCreated:u,onCancel:m,isWindowed:!0}),e[20]=j,e[21]=u,e[22]=m,e[23]=f):f=e[23];let p;e[24]!==i||e[25]!==f||e[26]!==r||e[27]!==d?(p=n.jsxs(I,{children:[h,n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center pointer-events-none",children:n.jsxs(M,{"aria-describedby":i,className:x,children:[r,d,f]})})]}),e[24]=i,e[25]=f,e[26]=r,e[27]=d,e[28]=p):p=e[28];let g;return e[29]!==y||e[30]!==s||e[31]!==p?(g=n.jsx(S,{open:y,onOpenChange:s,children:p}),e[29]=y,e[30]=s,e[31]=p,e[32]=g):g=e[32],g};function B(){return typeof document>"u"?!1:!!document.querySelector('[data-slot="dropdown-menu-content"][data-open], [data-slot="select-content"][data-open]')}export{G as MultiRunWindow};
