interface FormQueryListProject {
  year: number | null;
  page: number;
  pageSize: number;
  org: string;
  keyword: string;
  status: string;
  node: number | null;
  nodeId: string | null;
}

interface FormBasicinfo {
  year: number;
  projectName: string;
  reason: string;
  objective: string;
  node: number | null;
  nodeId: string | null;
  orgRevisionId: string | null;
}

interface FormGroupTarget {
  groupTarget: string;
  groupTargetSub: string;
  position: string;
  posType: string | null;
  level: string | null;
  type: string | null;
  amount: number | null;
}

interface FormGroupTargetPlannedGoal {
  positions: [
    {
      position: string;
      posTypeId: string;
      posLevelId: string;
    }
  ];
  plannedGoalPositions?: [
    {
      position: string;
      posTypePlannedId: string;
      posLevelPlannedId: string;
    }
  ];
  groupTarget: string;
  groupTargetSub: string;
  position: string;
  posType: string | null;
  posLevel: string | null;
  type: string | null;
  amount: number | null;
}

interface FormGroupRelate {
  relate: string;
  amount: number | null;
}

interface FormFollowResult {
  metricType: string;
  indicators: string;
  target: string;
  calculation: string;
  measuRement: string;
  results: string;
  obstacles: string;
  suggestions: string;
  project: string;
}

interface FormFollowOther {
  dateStart: Date | null;
  dateEnd: Date | null;
  totalDate: number;
  address: string;
  province: string;
  budget: string;
  accept: number | null;
  receive: number | null;
  approved: number | null;
  budgetPay: number | null;
  issues: string;
  chance: string;
  effects: string;
  riskLevel: string;
  riskManagement: string;
  benefits: string;
  topicsIssues: string;
  trainingStudy: string;
}

interface FormAddHistory {
  id: string;
  name: string | null;
  prefix: string;
  rank: string;
  firstName: string;
  lastName: string;
  citizenId: string;
  level: string;
  type: string;
  posLevelId: string;
  posTypeId: string;
  position: string;
  positionSide: string;
  posNo: string;
  oc: string;
  [key: string]: any;
}

interface FormAddHistoryEmployee {
  id: string;
  name: string | null;
  prefix: string;
  rank: string;
  firstName: string;
  lastName: string;
  citizenId: string;
  level: string;
  type: string;
  posLevelId: string;
  posTypeId: string;
  position: string;

  posNo: string;
  oc: string;
  [key: string]: any;
}

interface FormAddHistoryProject {
  id: string;
  project: string;
  year: string;
  trainingStart: null | Date;
  trainingEnd: null | Date;
  totalTraining: string;
  location: string;
  topic: string;
  // studyStart: string;
  // studyEnd: string;
  organizingTraining: string;
  [key: string]: any;
}

/** form เพิ่มรายการโครงการ/หลักสูตรการฝึกอบรม*/
interface FormAddProject {
  year: number;
  projectName: string;
  reason: string;
  objective: string;
  metricType: string;
  indicators: string;
  target: string;
  calculation: string;
  measuRement: string;
  results: string;
  obstacles: string;
  suggestions: string;
  project: string;
  isPassAllocate: boolean;
  isPassNoAllocate: boolean;
  isNoPass: boolean;
  isBudget: boolean;
  isOutBudget: boolean;
  dateStart: Date | null;
  dateEnd: Date | null;
  totalDate: number | null;
  address: string;
  provinceIds: any;
  budget: string;
  budgetSub: string;
  accept: number | string | null;
  receive: number | string | null;
  approved: number | string | null;
  budgetPay: number | string | null;
  issues: string;
  chance: number;
  effects: number;
  riskLevel: string;
  riskManagement: string;
  expect: string;
  topicAcademic: string;
  addressAcademic: string;
  provinceActualId: string;
  actualPeoples: People[];
  plannedPeoples: People[];
  actualGoals: actualGoals[];
  plannedGoals: PlannedGoals[];
  projectType: string;
  projectCharacteristics: string;
  projectDay: number | null;
  projectNigth: number | null;
  projectTechniques: string;
  projectModal: number | null;
}

interface People {
  groupTarget: string;
  amount: number | null;
}

interface actualGoals {
  groupTarget: string;
  groupTargetSub: string;
  position: string;
  posTypeActualId: string | null;
  posLevelActualId: string | null;
  type: string | null;
  amount: number | null;
}

interface PlannedGoals {
  groupTarget: string;
  groupTargetSub: string;
  positions?: [
    {
      position: string;
      posTypePlannedId: string;
      posLevelPlannedId: string;
    }
  ];
  plannedGoalPositions?: [
    {
      position: string;
      posTypePlannedId: string;
      posLevelPlannedId: string;
    }
  ];
  type: string | null;
  amount: number | null;
}

interface FormProject {
  year: number | null;
  projectName: "";
  node: number | null;
  nodeId: string | null;
  orgRevisionId: string | null;
}

export type {
  FormQueryListProject,
  FormAddProject,
  FormBasicinfo,
  FormGroupTarget,
  FormGroupRelate,
  FormFollowResult,
  FormFollowOther,
  FormAddHistory,
  FormAddHistoryProject,
  FormAddHistoryEmployee,
  FormGroupTargetPlannedGoal,
  FormProject,
};
