import{Hn as e,er as t,nr as n,rr as r,sr as i,tr as a}from"./app-server-manager-signals-Yn0WSnoY.js";import{R as o,V as s,h as c}from"./vscode-api-DjORcpSo.js";function l({getOptions:l,getParams:u,method:d}){let f=s(c,t=>e(d,{commonDir:t.commonDir,root:t.root},u(t),i(t.hostConfig),t.hostConfig,{enabled:t.enabled,...l?.(t)}),{excludeFieldsFromKey:[`operationSource`]}),p=o(c,(e,{get:t})=>(t(t(n,{commonDir:e.commonDir,enabled:e.enabled,hostConfig:e.hostConfig,operationSource:e.operationSource,root:e.root})),t(f,e)),{excludeFieldsFromKey:[`operationSource`]});return{fromCwd$:o(c,(e,{get:n})=>{if(!e.enabled||e.cwd==null)return t();let i=n(r,{cwd:e.cwd,enabled:e.enabled,hostConfig:e.hostConfig,operationSource:e.operationSource,watchForGitInit:!1}),o=i.data??null;if(o==null)return a(i);let{cwd:s,...c}=e;return n(p,{...c,commonDir:o.commonDir,root:o.root})},{excludeFieldsFromKey:[`operationSource`]}),fromMetadata$:p,queryByMetadata$:f}}var u=l({method:`current-branch`,getParams:e=>({operationSource:e.operationSource,root:e.root}),getOptions:e=>({refetchOnWindowFocus:e.refetchOnWindowFocus,select:e=>e.branch,...e.staleTime==null?{}:{staleTime:e.staleTime}})}),d=u.fromMetadata$,f=u.fromCwd$,p=o(c,(e,{get:t})=>t(f,e).data??null);export{l as i,f as n,p as r,d as t};
//# sourceMappingURL=git-current-branch-query-DhVq2YFM.js.map