import{t as e}from"./api-DqXJkjY6.js";var{useListLeadsQuery:t,useGetLeadQuery:n,useCreateLeadMutation:r,useUpdateLeadMutation:i,useAssignLeadMutation:a,useQualifyLeadMutation:o,useMarkLeadLostMutation:s,useConvertLeadMutation:c,useDeleteLeadMutation:l}=e.injectEndpoints({endpoints:e=>({listLeads:e.query({query:e=>({url:`/leads/`,params:e||void 0}),providesTags:e=>e?[...e.results.map(({id:e})=>({type:`Lead`,id:e})),{type:`Lead`,id:`LIST`}]:[{type:`Lead`,id:`LIST`}]}),getLead:e.query({query:e=>`/leads/${e}/`,providesTags:(e,t,n)=>[{type:`Lead`,id:n}]}),createLead:e.mutation({query:e=>({url:`/leads/`,method:`POST`,body:e}),invalidatesTags:[{type:`Lead`,id:`LIST`}]}),updateLead:e.mutation({query:({id:e,body:t})=>({url:`/leads/${e}/`,method:`PATCH`,body:t}),invalidatesTags:(e,t,{id:n})=>[{type:`Lead`,id:n},{type:`Lead`,id:`LIST`}]}),assignLead:e.mutation({query:({id:e,body:t})=>({url:`/leads/${e}/assign/`,method:`POST`,body:t}),invalidatesTags:(e,t,{id:n})=>[{type:`Lead`,id:n},{type:`Lead`,id:`LIST`}]}),qualifyLead:e.mutation({query:e=>({url:`/leads/${e}/qualify/`,method:`POST`}),invalidatesTags:(e,t,n)=>[{type:`Lead`,id:n},{type:`Lead`,id:`LIST`}]}),markLeadLost:e.mutation({query:({id:e,body:t})=>({url:`/leads/${e}/mark-lost/`,method:`POST`,body:t}),invalidatesTags:(e,t,{id:n})=>[{type:`Lead`,id:n},{type:`Lead`,id:`LIST`}]}),convertLead:e.mutation({query:e=>({url:`/leads/${e}/convert/`,method:`POST`}),invalidatesTags:(e,t,n)=>[{type:`Lead`,id:n},{type:`Lead`,id:`LIST`}]}),deleteLead:e.mutation({query:e=>({url:`/leads/${e}/`,method:`DELETE`}),invalidatesTags:[{type:`Lead`,id:`LIST`}]})})});export{n as a,o as c,l as i,i as l,c as n,t as o,r,s,a as t};