import { teamStore } from "@/store/team";
import { post } from "./axios";
async function useMember(data) {
  const res = await post("member", data, "MEMBER");
  return res;
}
export async function addConsultRecord(data) {
  const res = await useMember({ type: "addConsultRecord", ...data });
  return res;
}

export async function getConsultRecord(data) {
  const res = await useMember({ type: "getConsultRecord", createTeamId: teamStore().currentTeamId, ...data });
  return res;
}

export async function deleteConsultRecord(data) {
  const res = await useMember({ type: "deleteConsultRecord", ...data });
  return res;
}

export async function updateConsultRecord(data) {
  const res = await useMember({ type: "updateConsultRecord", ...data });
  return res;
}

export async function getConsultRecordCount(data) {
  const res = await useMember({ type: "getConsultRecordCount", ...data });
  return res;
}

export async function getConsultStageCount(data) {
  const res = await useMember({ type: "getConsultStageCount", ...data });
  return res;
}

export async function addEConsuleRecord(data) {
  const res = await useMember({ type: "addEConsuleRecord", ...data });
  return res;
}

export async function updateEConsuleRecord(data) {
  const res = await useMember({ type: "updateEConsuleRecord", ...data });
  return res;
}

export async function getEConsuleRecord(data) {
  const res = await useMember({ type: "getEConsuleRecord", ...data });
  return res;
}

export async function getFirstTriagePersonUserId(data) {
  const res = await useMember({ type: "getFirstTriagePersonUserId", ...data });
  return res;
}

export async function getFirstEConsuleRecord(data) {
  const res = await useMember({ type: "getFirstEConsuleRecord", ...data });
  return res;
}

export async function updateCustomerPersonResponsibles(data) {
  const res = await useMember({ type: "updateCustomerPersonResponsibles", ...data });
  return res;
}
