import{aD as l,u as d,r,bL as p,fC as f,q as g,s as o,g1 as I,W as D}from"./index-dP1W1_bd.js";const v=()=>{const a=l(),{id:s,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 a.featureGroups.delete({projectId:+s,featureStoreId:+e,featureGroupId:+t}),c(g(o.featureGroup.overview,o.project.value,{id:s,fsId:e,fgId:t})),a(I.invalidateTags([{type:D.ProjectTags.FeatureGroup,id:t}])),u(!1),n(o.featureGroup.list,{fsId:e})},[a,s,e,t,c,n]),isDeleting:i}};export{v as u};
