import{dq as s,U as p,dr as t,cn as i}from"./index-dP1W1_bd.js";const r=s.injectEndpoints({endpoints:a=>({getRemoteGroups:a.query({query:(e="")=>({url:`/mapping/search?query=${encodeURIComponent(e)}`}),providesTags:p.providesList(t.AdminProjectMappingTags.Groups)}),getRemoteGroupMembers:a.query({query:({groups:e})=>({url:"/mapping/members",query:e}),providesTags:p.providesList(t.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(t.AdminProjectMappingTags.Mapping)}),getMapping:a.query({query:({id:e})=>({url:`/mapping/${e}`}),providesTags:p.cacheByIdArgProperty(t.AdminProjectMappingTags.Mapping)}),updateMapping:a.mutation({query:({id:e,data:n})=>({url:`/mapping/${e}`,method:"put",data:n}),invalidatesTags:p.cacheByIdArgProperty(t.AdminProjectMappingTags.Mapping)}),createMapping:a.mutation({query:({data:e})=>({url:"/mapping",method:"post",data:e}),invalidatesTags:p.invalidatesList(t.AdminProjectMappingTags.Mapping)}),createMappingBulk:a.mutation({query:({data:e})=>({url:"/mapping/bulk",method:"post",data:e}),invalidatesTags:p.invalidatesList(t.AdminProjectMappingTags.Mapping)}),deleteMapping:a.mutation({query:({id:e})=>({url:`/mapping/${e}`,method:"delete"}),invalidatesTags:p.invalidatesList(t.AdminProjectMappingTags.Mapping)})})}),{useGetRemoteGroupsQuery:g,useGetRemoteGroupMembersQuery:u,useGetMappingsQuery:m,useGetMappingQuery:M,useUpdateMappingMutation:y,useCreateMappingMutation:d,useCreateMappingBulkMutation:c,useDeleteMappingMutation:T}=r,l=[{key:i.DATA_OWNER,label:i.DATA_OWNER},{key:i.DATA_SCIENTIST,label:i.DATA_SCIENTIST}],A=a=>a==null?void 0:a.map(e=>({key:e,label:e})),q=a=>a==null?void 0:a.map(e=>({key:e.name,label:e.name}));export{T as a,m as b,g as c,A as d,c as e,q as p,l as r,y as u};
