import{t as e}from"./api-DqXJkjY6.js";var{useGetEligibilityConfigQuery:t,useListEligibilityPoliciesQuery:n,useUpdateEligibilityPolicyMutation:r,useListEligibilityChecksQuery:i,useGetEligibilityCheckQuery:a,useRunEligibilityCheckMutation:o,useConvertEligibilityCheckMutation:s,useInitiateAadhaarMutation:c,useSubmitAadhaarMutation:l,useLookupPanMutation:u,useLookupMobileMutation:d}=e.injectEndpoints({endpoints:e=>({getEligibilityConfig:e.query({query:()=>`/eligibility/config/`,providesTags:[{type:`EligibilityConfig`,id:`SINGLETON`}]}),listEligibilityPolicies:e.query({query:()=>({url:`/eligibility/policies/`,params:{page_size:`100`}}),providesTags:e=>e?[...e.results.map(({loan_product:e})=>({type:`EligibilityPolicy`,id:e})),{type:`EligibilityPolicy`,id:`LIST`}]:[{type:`EligibilityPolicy`,id:`LIST`}]}),updateEligibilityPolicy:e.mutation({query:({productId:e,body:t})=>({url:`/eligibility/policies/${e}/`,method:`PATCH`,body:t}),invalidatesTags:(e,t,{productId:n})=>[{type:`EligibilityPolicy`,id:n},{type:`EligibilityPolicy`,id:`LIST`}]}),listEligibilityChecks:e.query({query:e=>({url:`/eligibility/checks/`,params:e||void 0}),providesTags:e=>e?[...e.results.map(({id:e})=>({type:`Eligibility`,id:e})),{type:`Eligibility`,id:`LIST`}]:[{type:`Eligibility`,id:`LIST`}]}),getEligibilityCheck:e.query({query:e=>`/eligibility/checks/${e}/`,providesTags:(e,t,n)=>[{type:`Eligibility`,id:n}]}),runEligibilityCheck:e.mutation({query:e=>({url:`/eligibility/checks/`,method:`POST`,body:e}),invalidatesTags:[{type:`Eligibility`,id:`LIST`}]}),initiateAadhaar:e.mutation({query:e=>({url:`/eligibility/aadhaar/initiate/`,method:`POST`,body:e})}),submitAadhaar:e.mutation({query:e=>({url:`/eligibility/aadhaar/submit/`,method:`POST`,body:e}),invalidatesTags:[{type:`Eligibility`,id:`LIST`}]}),lookupPan:e.mutation({query:e=>({url:`/eligibility/pan/lookup/`,method:`POST`,body:e})}),lookupMobile:e.mutation({query:e=>({url:`/eligibility/mobile/lookup/`,method:`POST`,body:e})}),convertEligibilityCheck:e.mutation({query:({id:e,outcome:t})=>({url:`/eligibility/checks/${e}/convert/`,method:`POST`,body:t?{outcome:t}:{}}),invalidatesTags:(e,t,{id:n})=>[{type:`Eligibility`,id:n},{type:`Eligibility`,id:`LIST`},{type:`Lead`,id:`LIST`},{type:`LoanApplication`,id:`LIST`}]})})});export{n as a,o as c,i,l,t as n,d as o,c as r,u as s,s as t,r as u};