"use strict";exports.id=5398,exports.ids=[5398],exports.modules={5398:(e,t,r)=>{r.d(t,{M_:()=>d,NL:()=>P,id:()=>c,le:()=>n,sD:()=>l,zf:()=>j});var p=r(8150);let s="/api/t_projects",o=p.g.enhanceEndpoints({addTagTypes:["Projects"]}),i=o.injectEndpoints({endpoints:e=>({getProjects:e.query({query:()=>s,providesTags:e=>e?[...e.map(({id:e})=>({type:"Projects",id:e})),{type:"Projects",id:"LIST"}]:[{type:"Projects",id:"LIST"}]}),getProjectsDashboardFiltered:e.query({query:()=>s+"?&properties[]=id&properties[]=budgetAllocation&properties[]=status",providesTags:e=>e?[...e.map(({id:e})=>({type:"Projects",id:e})),{type:"Projects",id:"LIST"}]:[{type:"Projects",id:"LIST"}]}),getProjectsDashboardFilteredAllStatus:e.query({query:()=>s+"?&properties[]=id&properties[]=financialYear&properties[]=projectName&properties[]=projectDescription&properties[]=mainStructureOffice&properties[]=budgetAllocation&properties[]=status&properties[]=subCounty&properties[]=ward&properties[]=municipality&properties[]=tProjectsImages",providesTags:e=>e?[...e.map(({id:e})=>({type:"Projects",id:e})),{type:"Projects",id:"LIST"}]:[{type:"Projects",id:"LIST"}]}),getProjectsDashboardFilteredByStatus:e.query({query:e=>s+"?Status="+e+"&properties[]=id&properties[]=projectName&properties[]=projectDescription&properties[]=mainStructureOffice&properties[]=budgetAllocation&properties[]=status&properties[]=municipality&properties[]=tProjectsImages",providesTags:e=>e?[...e.map(({id:e})=>({type:"Projects",id:e})),{type:"Projects",id:"LIST"}]:[{type:"Projects",id:"LIST"}]}),getProjectsSectorsFilteredBySector:e.query({query:e=>s+"?mainStructureOffice="+e+"&properties[]=id&properties[]=financialYear&properties[]=projectName&properties[]=projectDescription&properties[]=mainStructureOffice&properties[]=budgetAllocation&properties[]=status&properties[]=subCounty&properties[]=ward&properties[]=tProjectsImages",providesTags:e=>e?[...e.map(({id:e})=>({type:"Projects",id:e})),{type:"Projects",id:"LIST"}]:[{type:"Projects",id:"LIST"}]}),getProjectsSectorsFilteredBySubCounty:e.query({query:e=>s+"?subCounty="+e+"&properties[]=id&properties[]=financialYear&properties[]=projectName&properties[]=projectDescription&properties[]=mainStructureOffice&properties[]=budgetAllocation&&properties[]=status&properties[]=subCounty&properties[]=ward&properties[]=tProjectsImages",providesTags:e=>e?[...e.map(({id:e})=>({type:"Projects",id:e})),{type:"Projects",id:"LIST"}]:[{type:"Projects",id:"LIST"}]}),getProjectsSectorsFilteredByWard:e.query({query:e=>s+"?ward="+e+"&properties[]=id&properties[]=financialYear&properties[]=projectName&properties[]=projectDescription&properties[]=mainStructureOffice&properties[]=budgetAllocation&properties[]=status&properties[]=subCounty&properties[]=ward&properties[]=tProjectsImages",providesTags:e=>e?[...e.map(({id:e})=>({type:"Projects",id:e})),{type:"Projects",id:"LIST"}]:[{type:"Projects",id:"LIST"}]}),getSingleProject:e.query({query:e=>s+`/${e}`,providesTags:(e,t,r)=>[{type:"Projects",id:r}]}),addNewProject:e.mutation({query:e=>({url:s,method:"POST",body:e,headers:{"Content-type":"application/json; charset=UTF-8"}}),invalidatesTags:[{type:"Projects",id:"LIST"}]}),patchProject:e.mutation({query:e=>({url:s+`/${e.id}`,method:"PATCH",body:e}),invalidatesTags:(e,t,r)=>[{type:"Projects",id:r.id}]}),deleteProject:e.mutation({query:e=>({url:s+`/${e}`,method:"DELETE"}),invalidatesTags:(e,t,r)=>[{type:"Projects",id:r}]})}),overrideExisting:!1}),{useGetProjectsQuery:a,useGetProjectsDashboardFilteredQuery:c,useGetProjectsDashboardFilteredAllStatusQuery:d,useGetProjectsDashboardFilteredByStatusQuery:u,useGetProjectsSectorsFilteredByStatusQuery:y,useGetProjectsSectorsFilteredBySectorQuery:j,useGetProjectsSectorsFilteredBySubCountyQuery:n,useGetProjectsSectorsFilteredByWardQuery:P,useGetSingleProjectQuery:l}=i}};