import{bf as l,u as d,r,bg as p,f2 as f,o as g,q as o,fs as I,O as G}from"./index-CK33qGU_.js";const D=()=>{const s=l(),{id:a,fsId:e,fgId:t}=d(),[i,u]=r.useState(!1),n=p(),{handleDelete:c}=r.useContext(f);return{deleteFg:r.useCallback(async()=>{u(!0),await s.featureGroups.delete({projectId:+a,featureStoreId:+e,featureGroupId:+t}),c(g(o.featureGroup.overview,o.project.value,{id:a,fsId:e,fgId:t})),s(I.invalidateTags([{type:G.ProjectTags.FeatureGroup,id:t}])),u(!1),n(o.featureGroup.list,{fsId:e})},[s,a,e,t,c,n]),isDeleting:i}};export{D as u};
