import { IResponse } from "../../../../types/response.types";
import { TaskItemType } from "../../task/types/TaskTypes";

export type ProjectItem = {
  id: string;
  name: string;
  backgroundColor?: string;
  backgroundPicture?: string;
};

export type ProjectUserType = {
  id: string;
  firstName: string;
  lastName: string;
  profilePic?: string;
};

export type CreateProjectType = {
  name: string;
  ownerName: string;
  description: string;
  startDate: string;
  backgroundPicture: string;
  backgroundColor: string;
  isActive: boolean;
  workspaceId: string;
  userIds: string[];
};

export type ProjectDetailType = CreateProjectType & {
  id: string;
  users?: ProjectUserType[];
};

export type UpdateProjectType = CreateProjectType;

export type ProjectTaskType = TaskItemType;

export type ProjectTaskPhaseType = {
  id: string;
  name: string;
  order: number;
  color: string;
  tasks: ProjectTaskType[];
};

export type ProjectWithPhasesType = {
  id: string;
  name: string;
  taskPhases: ProjectTaskPhaseType[];
};

export interface GetProjectResponse extends IResponse<ProjectWithPhasesType> {
  statusCode: number;
}
