import axios from "@/config/axios";
import type { GetPagersResponse } from "../types/Types";
import type { PagerStatus } from "../enum/Enum";

export const getPagers = async (): Promise<GetPagersResponse> => {
  const { data } = await axios.get<GetPagersResponse>("/admin/pager");
  return data;
};

export const updatePagerStatus = async (id: string, status: PagerStatus) => {
  const { data } = await axios.patch(`/admin/pager/${id}/status`, { status });
  return data;
};
