import { http } from '@/services/api/http'
import { buildUrl, endpoints } from '@/services/api/endpoints'

export const apiGetStudentTickets = (params) => http.get(endpoints.getStudentTickets, { params })

export const apiGetStudentTicketStats = (params) =>
  http.get(endpoints.getStudentTicketStats, { params })

export const apiShowStudentTicket = (id) => http.get(buildUrl(endpoints.showStudentTicket, { id }))

export const apiCreateStudentTicket = (payload) => http.post(endpoints.createStudentTicket, payload)

export const apiSendStudentTicketMessage = (id, payload) =>
  http.post(buildUrl(endpoints.sendStudentTicketMessage, { id }), payload)
