import { FileInfo } from "./userRecords/userRecordsDto";

export interface LocalizedText {
  am: string;
  en: string;
}

export interface AssignmentEmployee {
  id?: string;
  name?: LocalizedText | string | null;
}

export interface AssignmentPosition {
  id?: string;
  name?: LocalizedText | string | null;
  department?: string | null;
  role?: string | null;
}

export interface AssignmentActor {
  id?: string;
  employee?: AssignmentEmployee | null;
  position?: AssignmentPosition | null;
}

export interface AssignmentAssignee {
  id?: string;
  employee?: AssignmentEmployee | null;
}

export interface AssignmentMultipleUser {
  id?: string;
  name?: LocalizedText | string | null;
  department?: string | null;
  role?: string | null;
  status?: string | null;
  completedDate?: string | null;
}

export interface AssignmentApiResponse {
  id: string;
  createdAt: string;
  status: string;
  comment?: string | null;
  assignerId?: string;
  assigneePositionId?: string;
  parentAssignmentId?: string | null;
  parentId?: string | null;
  previousStepId?: string | null;
  respondedAt?: string | null;
  repliedAt?: string | null;
  reassignAt?: string | null;
  amharicCreatedAt?: string | null;
  amharicRespondedAt?: string | null;
  amharicRepliedAt?: string | null;
  amharicReassignedAt?: string | null;
  assigneePosition?: AssignmentPosition | null;
  assigner?: AssignmentActor | null;
  assignee?: AssignmentAssignee | null;
  assignedToUsers?: AssignmentMultipleUser[] | null;
  children?: AssignmentApiResponse[];
  teeter?: (FileInfo & { presigned?: string; url?: string | null }) | null;
  signature?: (FileInfo & { presigned?: string; url?: string | null }) | null;
}

export interface AssignmentStep {
  assignedDate: string;
  completedDate?: string | null;
  status: "Accepted" | "Pending" | "Reassigned";
}
