/* eslint-disable @typescript-eslint/no-explicit-any */
import { apiServer } from 'boot/axios';

const actions = {
  async getListComment({ }, params: any) {
    const res = await apiServer.get(`/comment/by-slot/${params.id}`, {
      params: params.pagination,
    });
    return res.data;
  },
  async addComment({ }, params: any) {
    const res = await apiServer.post('/comment', params);
    return res.data;
  },
  async reactComment({ }, payload: any) {
    const res = await apiServer.post(`/comment/react/${payload.id}`, {
      params: payload.params
    });
    return res.data;
  },
};

const commentModule = {
  namespaced: true,
  actions,
};

export default commentModule;
