import{t as e}from"./api-DqXJkjY6.js";var{useListMakesQuery:t,useGetMakeQuery:n,useCreateMakeMutation:r,useUpdateMakeMutation:i,useDeleteMakeMutation:a,useListModelsQuery:o,useGetModelQuery:s,useCreateModelMutation:c,useUpdateModelMutation:l,useDeleteModelMutation:u,useListVariantsQuery:d,useGetVariantQuery:f,useCreateVariantMutation:p,useUpdateVariantMutation:m,useDeleteVariantMutation:h}=e.injectEndpoints({endpoints:e=>({listMakes:e.query({query:e=>({url:`/vehicle-makes/`,params:e||void 0}),providesTags:e=>e?[...e.results.map(({id:e})=>({type:`VehicleMake`,id:e})),{type:`VehicleMake`,id:`LIST`}]:[{type:`VehicleMake`,id:`LIST`}]}),getMake:e.query({query:e=>`/vehicle-makes/${e}/`,providesTags:(e,t,n)=>[{type:`VehicleMake`,id:n}]}),createMake:e.mutation({query:e=>({url:`/vehicle-makes/`,method:`POST`,body:e}),invalidatesTags:[{type:`VehicleMake`,id:`LIST`}]}),updateMake:e.mutation({query:({id:e,body:t})=>({url:`/vehicle-makes/${e}/`,method:`PATCH`,body:t}),invalidatesTags:(e,t,{id:n})=>[{type:`VehicleMake`,id:n},{type:`VehicleMake`,id:`LIST`}]}),deleteMake:e.mutation({query:e=>({url:`/vehicle-makes/${e}/`,method:`DELETE`}),invalidatesTags:(e,t,n)=>[{type:`VehicleMake`,id:n},{type:`VehicleMake`,id:`LIST`}]}),listModels:e.query({query:e=>({url:`/vehicle-models/`,params:e||void 0}),providesTags:e=>e?[...e.results.map(({id:e})=>({type:`VehicleModel`,id:e})),{type:`VehicleModel`,id:`LIST`}]:[{type:`VehicleModel`,id:`LIST`}]}),getModel:e.query({query:e=>`/vehicle-models/${e}/`,providesTags:(e,t,n)=>[{type:`VehicleModel`,id:n}]}),createModel:e.mutation({query:e=>({url:`/vehicle-models/`,method:`POST`,body:e}),invalidatesTags:[{type:`VehicleModel`,id:`LIST`}]}),updateModel:e.mutation({query:({id:e,body:t})=>({url:`/vehicle-models/${e}/`,method:`PATCH`,body:t}),invalidatesTags:(e,t,{id:n})=>[{type:`VehicleModel`,id:n},{type:`VehicleModel`,id:`LIST`}]}),deleteModel:e.mutation({query:e=>({url:`/vehicle-models/${e}/`,method:`DELETE`}),invalidatesTags:(e,t,n)=>[{type:`VehicleModel`,id:n},{type:`VehicleModel`,id:`LIST`}]}),listVariants:e.query({query:e=>({url:`/vehicle-variants/`,params:e||void 0}),providesTags:e=>e?[...e.results.map(({id:e})=>({type:`VehicleVariant`,id:e})),{type:`VehicleVariant`,id:`LIST`}]:[{type:`VehicleVariant`,id:`LIST`}]}),getVariant:e.query({query:e=>`/vehicle-variants/${e}/`,providesTags:(e,t,n)=>[{type:`VehicleVariant`,id:n}]}),createVariant:e.mutation({query:e=>({url:`/vehicle-variants/`,method:`POST`,body:e}),invalidatesTags:[{type:`VehicleVariant`,id:`LIST`}]}),updateVariant:e.mutation({query:({id:e,body:t})=>({url:`/vehicle-variants/${e}/`,method:`PATCH`,body:t}),invalidatesTags:(e,t,{id:n})=>[{type:`VehicleVariant`,id:n},{type:`VehicleVariant`,id:`LIST`}]}),deleteVariant:e.mutation({query:e=>({url:`/vehicle-variants/${e}/`,method:`DELETE`}),invalidatesTags:(e,t,n)=>[{type:`VehicleVariant`,id:n},{type:`VehicleVariant`,id:`LIST`}]})})});export{u as a,o as c,l as d,m as f,a as i,d as l,c as n,h as o,p as r,t as s,r as t,i as u};