import{c as _,R as k,j as n,bd as D,bb as C,bc as I,b9 as M,b7 as S}from"./vendor-.bun-BhvYqrsL.js";import{u as z,m as w,H as O}from"./useAppFontEffects-BpEhBbR6.js";import{M as P}from"./main-BXjogxEm.js";import"./index-DoSb34qD.js";import"./NewWorktreeDialog-CVrwBaFz.js";import"./mobileLayoutPreference-Dio-WWkI.js";import"./SessionSwitcherDropdown-DbZLobnF.js";const $=R=>{const e=_.c(33),{open:y,onOpenChange:t,initialPrompt:v}=R,i=k.useId(),{t:o}=z(),N=B;let s;e[0]!==t?(s=j=>{!j&&N()||t(j)},e[0]=t,e[1]=s):s=e[1];let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=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]=b):b=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 g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(O,{name:"close",className:"h-5 w-5"}),e[8]=g):g=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:g})}),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]!==v||e[21]!==u||e[22]!==m?(f=n.jsx(P,{initialPrompt:v,onCreated:u,onCancel:m,isWindowed:!0}),e[20]=v,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:[b,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 h;return e[29]!==y||e[30]!==s||e[31]!==p?(h=n.jsx(S,{open:y,onOpenChange:s,children:p}),e[29]=y,e[30]=s,e[31]=p,e[32]=h):h=e[32],h};function B(){return typeof document>"u"?!1:!!document.querySelector('[data-slot="dropdown-menu-content"][data-open], [data-slot="select-content"][data-open]')}export{$ as MultiRunWindow};
