import{n as e}from"./rolldown-runtime-BG2f4sTM.js";import{$ct as t,AX as n,Az as r,FX as i,MK as a,M_t as o,Mft as s,Mvt as c,NK as l,NX as u,O_t as d,PK as f,P_t as p,Rut as m,U7 as h,W7 as g,X4 as _,Z_t as v,Zct as y,cdt as b,gK as x,jK as S,jX as C,jft as w,jz as T,ldt as E,mK as D,n3 as O,wK as k,xK as A,xot as j,yot as M,zut as N}from"./app-initial-BHB6SClA.js";function P({authMethod:e,buildFlavor:t,codexHome:n,isOpenAICuratedRemoteMarketplaceEnabled:r,workspaceRoots:i}){return{buildFlavor:t,cwds:A({codexHome:n,hostId:j,workspaceRoots:i}),hiddenMarketplaceNames:D({isOpenAICuratedRemoteMarketplaceEnabled:r,shouldHideOpenAICuratedMarketplaces:a(e)}),marketplaceKinds:x({additionalMarketplaceKinds:[],includeRemoteCatalog:!0,includeVerticalCatalog:!r})}}var F,I=e((()=>{d(),S(),k(),N(),s(),M(),E(),T(),F=v(w,e=>({queryKey:[...r,e],queryFn:()=>{let t=m.pluginScheduledTasks;if(t==null)throw Error(`Plugin scheduled tasks are unavailable`);return t.list(e)},staleTime:b.ONE_MINUTE}))}));function L(e){let n=(0,R.c)(9),{hostId:r}=e,a=t(`3309093858`),s=t(`4218407052`),c;n[0]===r?c=n[1]:(c={hostId:r},n[0]=r,n[1]=c);let l=f(c),u=i(j),d=C(j),g=p(O),_=r===`local`&&a&&l&&m.pluginScheduledTasks!=null,v=u?.authMethod??null,y;n[2]!==d||n[3]!==s||n[4]!==v||n[5]!==g.data?.roots?(y=P({authMethod:v,buildFlavor:h(),codexHome:d,isOpenAICuratedRemoteMarketplaceEnabled:s,workspaceRoots:g.data?.roots}),n[2]=d,n[3]=s,n[4]=v,n[5]=g.data?.roots,n[6]=y):y=n[6];let b=_&&g.isFetched,x;n[7]===b?x=n[8]:(x={enabled:b},n[7]=b,n[8]=x);let S=o(F,y,x);return _?S.data:void 0}var R,z=e((()=>{R=c(),d(),u(),n(),l(),N(),_(),M(),y(),g(),I()}));export{L as n,z as t};
//# sourceMappingURL=use-plugin-scheduled-tasks-CWW1n729.js.map