import type {
  ProjectInfo,
  MilestoneInfo,
  TaskInfo,
  MemberInfo,
  ResourceInfo,
  RiskInfo,
  TimelineNodeInfo,
  ProjectItem,
  ProjectStatistics
} from "@/api/project";

/** 项目查询参数 */
export interface ProjectQueryParams {
  pageNum?: number;
  pageSize?: number;
  keyword?: string;
  status?: string;
}

/** 优先级选项 */
export const PriorityOptions = [
  { label: "最高", value: "highest" },
  { label: "高", value: "high" },
  { label: "中", value: "medium" },
  { label: "低", value: "low" },
  { label: "最低", value: "lowest" }
];

/** 项目类型选项 */
export const ProjectTypeOptions = [
  { label: "建筑工程", value: "construction" },
  { label: "软件开发", value: "software" },
  { label: "产品研发", value: "product" },
  { label: "市场推广", value: "marketing" },
  { label: "其他", value: "other" }
];

/** 甘特图数据项 */
export interface GanttItem {
  id: string;
  name: string;
  startDate: string;
  endDate: string;
  progress: number;
  status: number;
  riskLevel?: number;
  ownerName?: string;
}

/** 新建项目表单数据 */
export interface CreateProjectForm {
  project: ProjectInfo;
  milestones: MilestoneInfo[];
  tasks: TaskInfo[];
  members: MemberInfo[];
  resources: ResourceInfo[];
  risks: RiskInfo[];
  timeline_nodes: TimelineNodeInfo[];
}

/** 步骤枚举 */
export enum WizardStep {
  Upload = 0,
  Preview = 1,
  Confirm = 2
}

export type {
  ProjectInfo,
  MilestoneInfo,
  TaskInfo,
  MemberInfo,
  ResourceInfo,
  RiskInfo,
  TimelineNodeInfo,
  ProjectItem,
  ProjectStatistics
};
