import {createApi} from "@reduxjs/toolkit/query/react";
import {baseQueryWithAuth} from "./baseQuery.js";


export const appointmentTypesApi = createApi({
    reducerPath: 'appointmentTypesApi',
    baseQuery: baseQueryWithAuth,
    tagsTypes: ['AppointmentTypes'],
    endpoints: (builder) => ({
        getAppointmentTypes: builder.query({
            query: () => '/appointment_types/',
            providesTags: ['AppointmentTypes'],
        }),
    }),
});

export const {useGetAppointmentTypesQuery} = appointmentTypesApi;