import{dQ as s,T as p,dR as i,dO as t}from"./index-46ma1THH.js";const r=s.injectEndpoints({endpoints:a=>({getRemoteGroups:a.query({query:(e="")=>({url:`/mapping/search?query=${encodeURIComponent(e)}`}),providesTags:p.providesList(i.AdminProjectMappingTags.Groups)}),getRemoteGroupMembers:a.query({query:({groups:e})=>({url:"/mapping/members",query:e}),providesTags:p.providesList(i.AdminProjectMappingTags.Members)}),getMappings:a.query({query:()=>({url:"/mapping?sort_by=id"}),transformResponse:e=>(e==null?void 0:e.count)>0?e.items:[],providesTags:p.providesList(i.AdminProjectMappingTags.Mapping)}),getMapping:a.query({query:({id:e})=>({url:`/mapping/${e}`}),providesTags:p.cacheByIdArgProperty(i.AdminProjectMappingTags.Mapping)}),updateMapping:a.mutation({query:({id:e,data:n})=>({url:`/mapping/${e}`,method:"put",data:n}),invalidatesTags:p.cacheByIdArgProperty(i.AdminProjectMappingTags.Mapping)}),createMapping:a.mutation({query:({data:e})=>({url:"/mapping",method:"post",data:e}),invalidatesTags:p.invalidatesList(i.AdminProjectMappingTags.Mapping)}),createMappingBulk:a.mutation({query:({data:e})=>({url:"/mapping/bulk",method:"post",data:e}),invalidatesTags:p.invalidatesList(i.AdminProjectMappingTags.Mapping)}),deleteMapping:a.mutation({query:({id:e})=>({url:`/mapping/${e}`,method:"delete"}),invalidatesTags:p.invalidatesList(i.AdminProjectMappingTags.Mapping)})})}),{useGetRemoteGroupsQuery:g,useGetMappingsQuery:m,useUpdateMappingMutation:u,useCreateMappingBulkMutation:M,useDeleteMappingMutation:d}=r,y=[{key:t.DATA_OWNER,label:t.DATA_OWNER},{key:t.DATA_SCIENTIST,label:t.DATA_SCIENTIST}],T=a=>a==null?void 0:a.map(e=>({key:e,label:e})),c=a=>a==null?void 0:a.map(e=>({key:e.name,label:e.name}));export{d as a,m as b,g as c,T as d,M as e,c as p,y as r,u};
