import{n as e}from"./rolldown-runtime-BG2f4sTM.js";import{Dvt as t,HB as n,Ilt as r,JB as i,Jlt as a,MB as o,Mvt as s,Rft as c,Rlt as l,Vft as u,WB as d,Wft as f,bft as p,d_ as m,f_ as h,gut as g,hut as _,jB as v,qlt as y,xft as b}from"./app-initial-BHB6SClA.js";function x(e){let t=(0,S.c)(43),{cloudDisabled:i,cloudUsesLocalExecutor:a,isLocalExecutorStarting:o,runLocation:s,onRunLocationChange:c}=e,l=f(),h;t[0]!==l||t[1]!==o?(h=o?l.formatMessage({id:`composer.runLocation.triggerLabel.localExecutorStarting`,defaultMessage:`Choose where to run this task. Local execution is starting…`,description:`Accessible label for the run location menu while local execution starts`}):l.formatMessage({id:`composer.runLocation.triggerLabel`,defaultMessage:`Choose where to run this chat`,description:`Accessible label and tooltip for the run location menu`}),t[0]=l,t[1]=o,t[2]=h):h=t[2];let g=h,b;t[3]!==l||t[4]!==o||t[5]!==g?(b=o?l.formatMessage({id:`composer.runLocation.triggerTooltip.localExecutorStarting`,defaultMessage:`Local execution is starting…`,description:`Tooltip on the composer run-location button shown while Desktop starts local execution for a Cloud Work task`}):g,t[3]=l,t[4]=o,t[5]=g,t[6]=b):b=t[6];let x=b,w;t[7]!==o||t[8]!==s?(w=s===`cloud`?(0,C.jsx)(m,{className:p(`icon-xs`,o&&`motion-safe:animate-pulse`)}):(0,C.jsx)(v,{className:`icon-xs`}),t[7]=o,t[8]=s,t[9]=w):w=t[9];let T;t[10]!==o||t[11]!==w||t[12]!==g?(T=(0,C.jsx)(_,{"aria-busy":o,"aria-label":g,"data-composer-navigation-target":`run-location`,color:`ghost`,size:`composerSm`,uniform:!0,children:w}),t[10]=o,t[11]=w,t[12]=g,t[13]=T):T=t[13];let E;t[14]!==T||t[15]!==x?(E=(0,C.jsx)(r,{tooltipContent:x,children:T}),t[14]=T,t[15]=x,t[16]=E):E=t[16];let D;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,C.jsx)(d.Title,{children:(0,C.jsx)(u,{id:`composer.runLocation.title.question`,defaultMessage:`Where should this chat run?`,description:`Header above the run location options in the composer action bar`})}),t[17]=D):D=t[17];let O=s===`local`?y:void 0,k;t[18]===c?k=t[19]:(k=()=>c(`local`),t[18]=c,t[19]=k);let A,j;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,C.jsx)(`span`,{className:`text-token-description-foreground`,children:(0,C.jsx)(u,{id:`composer.runLocation.local.description`,defaultMessage:`Read and edit local files with permission`,description:`Description explaining file access when a task runs on the user's computer`})}),A=(0,C.jsx)(u,{id:`composer.runLocation.local.optionLabel`,defaultMessage:`On your computer`,description:`Option to run a task on the user's computer`}),t[20]=A,t[21]=j):(A=t[20],j=t[21]);let M;t[22]!==O||t[23]!==k?(M=(0,C.jsx)(d.Item,{LeftIcon:v,RightIcon:O,onClick:k,allowWrap:!0,SubText:j,children:A}),t[22]=O,t[23]=k,t[24]=M):M=t[24];let N=s===`cloud`?y:void 0,P;t[25]===c?P=t[26]:(P=()=>c(`cloud`),t[25]=c,t[26]=P);let F;t[27]===a?F=t[28]:(F=(0,C.jsx)(`span`,{className:`text-token-description-foreground`,children:a?(0,C.jsx)(u,{id:`composer.runLocation.cloud.description.localExecutor`,defaultMessage:`Can read and edit local files`,description:`Description for the Cloud run location when local execution is enabled. Explains that ChatGPT runs in the cloud while retaining access to files on the user's computer.`}):(0,C.jsx)(u,{id:`composer.runLocation.cloud.description`,defaultMessage:`Can't access local files unless attached`,description:`Description explaining file access limitations when a task runs in the cloud`})}),t[27]=a,t[28]=F);let I;t[29]!==i||t[30]!==l?(I=i?l.formatMessage({id:`composer.runLocation.cloud.tooltip.projectOnlyMemory`,defaultMessage:`Cloud is unavailable for projects with project-only memory`,description:`Tooltip explaining why cloud Work cannot be selected for a project with project-only memory`}):void 0,t[29]=i,t[30]=l,t[31]=I):I=t[31];let L;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,C.jsx)(u,{id:`composer.runLocation.cloud`,defaultMessage:`In the cloud`,description:`Option to run a task in the cloud`}),t[32]=L):L=t[32];let R;t[33]!==i||t[34]!==N||t[35]!==P||t[36]!==F||t[37]!==I?(R=(0,C.jsx)(d.Item,{LeftIcon:m,RightIcon:N,disabled:i,focusableWhenDisabled:i,onClick:P,allowWrap:!0,SubText:F,tooltipText:I,children:L}),t[33]=i,t[34]=N,t[35]=P,t[36]=F,t[37]=I,t[38]=R):R=t[38];let z;return t[39]!==M||t[40]!==R||t[41]!==E?(z=(0,C.jsxs)(n,{align:`end`,side:`top`,contentWidth:`sm`,triggerButton:E,children:[D,M,R]}),t[39]=M,t[40]=R,t[41]=E,t[42]=z):z=t[42],z}var S,C;e((()=>{S=s(),b(),c(),g(),i(),l(),a(),h(),o(),C=t()}))();export{x as ComposerActionBarRunLocationDropdown};
//# sourceMappingURL=composer-action-bar-run-location-dropdown-Dp_fH6by.js.map