import{q as p,u as m,bo as v,ec as g,w as G,x as I,r as d,o as j}from"./index-46ma1THH.js";import{p as x}from"./project-DhxCVD8Q.js";const N=(r="",t=p.project.featureGroup.overview)=>{const{id:s,fsId:a}=m(),o=v(),e=g({pId:+s,fsId:+a,fgName:r},{skip:!r,selectFromResult:G({currentData:I(x(["version","id"]))})}),u=d.useCallback(l=>{var c,i;const n=(i=(c=e.currentData)==null?void 0:c.find(({version:f})=>f===+l))==null?void 0:i.id;n&&o(j(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{N as u};
