import{a7 as s,a4 as n}from"./index-dNe6i2rS.js";const t=s.injectEndpoints({endpoints:r=>({getAllBanners:r.query({query:()=>({url:"banners?sort_by=ID"}),providesTags:[n.BannerTag.Banners]}),getBanners:r.query({query:()=>({url:"banners?sort_by=created_on:desc&filter_by=ACTIVE:1&limit=3"}),providesTags:[n.BannerTag.Banners]}),getBanner:r.query({query:({id:e})=>({url:`banners/${e}`}),providesTags:[n.BannerTag.Banners]}),createBanner:r.mutation({query:e=>({url:"banners",method:"post",data:e}),invalidatesTags:(e,a)=>[n.BannerTag.Banners],extraOptions:{skipError:!0}}),updateBanner:r.mutation({query:({id:e,data:a})=>({url:`banners/${e}`,method:"put",data:a}),invalidatesTags:[n.BannerTag.Banners]}),deleteBanner:r.mutation({query:({id:e})=>({url:`banners/${e}`,method:"delete"}),invalidatesTags:[n.BannerTag.Banners],extraOptions:{skipError:!0}}),getUserBanner:r.query({query:()=>({url:"banners/user"}),providesTags:[n.BannerTag.User]})})}),{useGetAllBannersQuery:o,useGetBannersQuery:B,useGetBannerQuery:i,useCreateBannerMutation:y,useUpdateBannerMutation:g,useDeleteBannerMutation:p,useGetUserBannerQuery:T}=t;export{o as a,g as b,p as c,y as d,B as u};
