// Need to use the React-specific entry point to import createApi
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
import { baseQuery } from "./token.serivce";

// Define a service using a base URL and expected endpoints
export const dashboardMaster = createApi({
  reducerPath: "Dashboard",
  baseQuery: baseQuery,
  tagTypes: ["getDashboard"],
  endpoints: (builder) => ({
    // ======[Get All]=====

    getDashboardMaster: builder.query({
      query: () => `/dashboard/admin/`,
      providesTags: ["getDashboard"],
    }),
  }),
});

export const { useGetDashboardMasterQuery } = dashboardMaster;
