import request from "@/service";
export const groupList = (data) => {
  return request({
    url: "/api/v1/admin-web/group-list",
    method: "POST",
    data,
  });
};

export const groupDismiss = (data) => {
  return request({
    url: "/api/v1/admin-web/group-dismiss",
    method: "POST",
    data,
  });
};

export const groupDelete = (data) => {
  return request({
    url: "/api/v1/admin-web/group-delete",
    method: "POST",
    data,
  });
};

export const groupMemberList = (data) => {
  return request({
    url: "/api/v1/admin-web/group-member-list",
    method: "POST",
    data,
  });
};

export const groupPosition = (data) => {
  return request({
    url: "/api/v1/admin-web/query/group/position",
    method: "POST",
    data,
  });
};
// 设置群管理
export const groupEditDept = (data) => {
  return request({
    url: "/api/v1/admin-web/edit-dept",
    method: "POST",
    data,
  });
};
// 群聊记录
export const groupRecord = (data) => {
  return request({
    url: "/api/v1/admin-web/search-group-record",
    method: "POST",
    data,
  });
};

// 会话记录
export const forwardRecord = (data) => {
  return request({
    url: "/api/v1/admin-web/records/forward",
    method: "POST",
    data,
  });
};

//更新聊天系统头像
export const updateChatAvatar = (data) => {
  return request({
    url: "/api/v1/admin-web/update/avatar",
    method: "POST",
    data,
  });
};
// 导出
export const getExport = (data) => {
  return request({
    url: "/api/v1/admin-web/update/avatar",
    method: "POST",
    data,
  });
};
export const exportChatHistory = (data) => {
  return request({
    url: "/api/v1/admin-web/export-group-record/export",
    method: "POST",
    data,
     responseType: 'blob' 
  });
};
