import axios from "../../../config/axios";
import {
  CreateStickerType,
  GroupStickersResponse,
  StickersResponse,
} from "../types/Types";

export const getStickers = async (): Promise<StickersResponse> => {
  const { data } = await axios.get("/admin/dpage/stickers");
  return data;
};

export const getGroupStickers = async (): Promise<GroupStickersResponse> => {
  const { data } = await axios.get("/admin/dpage/stickers/groups");
  return data;
};

export const createSticker = async (params: CreateStickerType) => {
  const { data } = await axios.post("/admin/dpage/stickers", params);
  return data;
};

export const deleteSticker = async (id: string) => {
  const { data } = await axios.delete(`/admin/dpage/stickers/${id}`);
  return data;
};
