import{a7 as s,a4 as n,aT as r,aQ as o}from"./index-dNe6i2rS.js";const l=s.injectEndpoints({endpoints:a=>({getRoleChainingAvailable:a.query({query:()=>({url:"/admin/cloud/role-mappings/isAvailable"}),extraOptions:{skipError:!0}}),getRoleChainingAdminList:a.query({query:()=>({url:"/admin/cloud/role-mappings?sort_by=ID"}),providesTags:o.providesList(n.IAMRoleChainingTags.RoleChainingAdminList),transformResponse:i=>i.count>0?i.items:[]}),createRoleChaining:a.mutation({query:i=>({url:`/admin/cloud/role-mappings?${r.stringify(i)}`,method:"post"}),invalidatesTags:(i,t)=>[{type:n.IAMRoleChainingTags.RoleChainingAdminList},{type:n.IAMRoleChainingTags.RoleChainingList}],extraOptions:{skipError:!0}}),updateRoleChaining:a.mutation({query:({id:i,data:t})=>{const e=r.stringify(t);return{url:`/admin/cloud/role-mappings/${i}/?${e}`,method:"put"}},invalidatesTags:(i,t,{id:e})=>[{type:n.IAMRoleChainingTags.RoleChainingAdminList,id:e},{type:n.IAMRoleChainingTags.RoleChainingList,id:e}]}),deleteRoleChaining:a.mutation({query:({id:i})=>({url:`/admin/cloud/role-mappings/${i}`,method:"delete"}),invalidatesTags:(i,t,{id:e})=>[{type:n.IAMRoleChainingTags.RoleChainingAdminList,id:e}]})})}),{useGetRoleChainingAvailableQuery:p,useGetRoleChainingAdminListQuery:m,useCreateRoleChainingMutation:d,useUpdateRoleChainingMutation:h,useDeleteRoleChainingMutation:C}=l;export{m as a,h as b,C as c,d,p as u};
