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