import{u as f,aR as m,dv as g,dw as G,y as I,r as d,g as y,e as p}from"./index-d6499a22.js";import{p as D}from"./project-e798ae71.js";const h=(r="",t=p.featureGroup.overview)=>{const{id:s,fsId:a}=f(),o=m(),e=g({pId:+s,fsId:+a,fgName:r},{skip:!r,selectFromResult:G({currentData:I(D(["version","id"]))})}),u=d.useCallback(l=>{var i,c;const n=(c=(i=e.currentData)==null?void 0:i.find(({version:v})=>v===+l))==null?void 0:c.id;n&&o(y(t,p.project.value,{id:s,fsId:a,fgId:n}))},[e.currentData,o,t,s,a]);return d.useMemo(()=>({...e,handleVersionChange:u}),[e,u])};export{h as u};
