export type ProjectStatus = "DRAFT" | "OPEN" | "CLOSED" | "FINALIZED";

export type ProjectBaby = {
  id: string;
  projectId: string;
  babyIndex: number;
  label: string | null;
};

export type ProjectSummary = {
  id: string;
  workspaceId: string;
  createdById: string;
  clonedFromProjectId: string | null;
  name: string;
  description: string | null;
  projectImageUrl: string | null;
  projectBgColor: string | null;
  status: ProjectStatus;
  babyCount: number;
  createdAt: string;
  updatedAt: string;
  babies: ProjectBaby[];
  _count?: {
    memberships: number;
    cards: number;
  };
};

export type CreateProjectPayload = {
  name: string;
  description?: string;
  babyCount?: number;
  status?: ProjectStatus;
  babyLabels?: string[];
  enabledLegacyCardCodes?: string[];
  participantUserIds?: string[];
};

export type CloneProjectPayload = {
  name?: string;
  description?: string;
  includeParticipants?: boolean;
};

export type ProjectParticipant = {
  id: string;
  projectId: string;
  userId: string;
  assignedById: string | null;
  createdAt: string;
  updatedAt: string;
  user: {
    id: string;
    username: string;
    displayName: string | null;
    profileImageUrl: string | null;
    profileBgColor: string | null;
    role: "ADMIN" | "FAMILY";
    createdAt?: string;
  };
};
