import { defHttp } from '/@/utils/http/axios';
// PageParams
import { BasicStaticsParams } from './model';
import { Result } from '/#/axios';

enum Api {
  bulletChat = '/zfb-api/zfb/platform/bulletChat/list',
  userStatics = '/zfb-api/zfb/platform/dashboard/liveRoom/userStatics',
  bulletChatStatics = '/zfb-api/zfb/platform/dashboard/liveRoom/bulletChatStatics',
  liveRoomStatics = '/zfb-api/zfb/platform/dashboard/company/liveRoomStatics',
  bulletChatExport = '/zfb-api/zfb/platform/bulletChat/export',
  companyChatExport = '/zfb-api/zfb//platform/dashboard/company/export',
}

/**
 * @description: Get sample list value
 */

export const bulletChatApi = (params: BasicStaticsParams) =>
  defHttp.post<Result>({
    url: Api.bulletChat,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const userStaticsApi = (params: BasicStaticsParams) =>
  defHttp.post<Result>({
    url: Api.userStatics,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const bulletChatStaticsApi = (params: BasicStaticsParams) =>
  defHttp.post<Result>({
    url: Api.bulletChatStatics,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const bulletChatExportApi = (params: BasicStaticsParams) =>
  defHttp.post<Blob>({
    url: Api.bulletChatExport,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const companyChatExportApi = (params: BasicStaticsParams) =>
  defHttp.post<Blob>({
    url: Api.bulletChatExport,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
