import axiosInstance from "@/shared/services/axiosInstance";
export interface UploadUserPayload {
  unitId: string;
  positions: BulkUploadPositionDto[];
  users: BulkUploadUserDto[];
}

export interface BulkUploadPositionDto {
  Position: string;
  AmharicPosition: string;
  ReportsTo: string;
  PositionType: string;
}

export interface UploadUpdate {
  unitId: string;
  positions: BulkUploadPositionDto[];
}

export interface BulkUploadUserGroupDto {
  users: BulkUploadUserDto[];
}

export interface BulkUploadUserDto {
  AmharicFirstName: string;
  AmharicLastName: string;
  EnglishFirstName: string;
  EnglishLastName: string;
  Position: string;
  Username: string;
  Email: string;
  PhoneNumber: string;
}

export const uploadBulkUsers = async (payload: UploadUserPayload) => {
  return axiosInstance.post("/employees/upload-user-csv-2", payload, {});
};
export const updateBulkUsers = async (payload: UploadUpdate) => {
  return axiosInstance.post("/employees/upload-position-csv-2", payload, {});
};
