import{a7 as c,aQ as o,a4 as t}from"./index-BKr2rJhV.js";const p=c.injectEndpoints({endpoints:r=>({getListOfProjects:r.query({query:()=>({url:"project"}),transformResponse:e=>e.map(({project:s,user:a})=>({...s,projectId:s.id,projectName:s.name,user:a})),providesTags:o.providesList(t.ProjectTags.Project)}),getAllProjects:r.query({query:()=>({url:"project/getAll"}),providesTags:o.providesList(t.ProjectTags.Project)}),createProject:r.mutation({query:e=>({url:"project",method:"post",data:e}),invalidatesTags:o.invalidatesList(t.ProjectTags.Project)}),getProject:r.query({query:e=>({url:`project/${e}`}),providesTags:o.cacheByIdArg(t.ProjectTags.Project),extraOptions:{skipError:!0}}),getProjectMapping:r.query({query:e=>({url:`project/${e}/groupMappings`}),providesTags:o.cacheByIdArg(t.ProjectTags.ProjectMappings),extraOptions:{skipError:!0}}),getProjectQuotas:r.query({query:e=>({url:`project/${e}/quotas`}),providesTags:o.cacheByIdArg(t.ProjectTags.Project),extraOptions:{skipError:!0}}),editProject:r.mutation({query:({id:e,data:s})=>({url:`project/${e}`,method:"put",data:s}),invalidatesTags:(e,s,a)=>[{type:t.ProjectTags.Project,id:a.id},...a.data.featureStoreTopic!==void 0?[t.ProjectTags.KafkaTopics]:[]]}),deleteProject:r.mutation({query:e=>({url:`project/${e}/delete`,method:"post"}),invalidatesTags:o.invalidatesList(t.ProjectTags.Project)})})}),{useGetListOfProjectsQuery:u,useGetProjectQuery:j,useCreateProjectMutation:P,useEditProjectMutation:g,useDeleteProjectMutation:n,useGetAllProjectsQuery:d,useGetProjectMappingQuery:y,useGetProjectQuotasQuery:T,endpoints:l,util:q}=p;export{u as a,P as b,g as c,j as d,d as e,y as f,n as g,l as p,T as u};
