import type { UploadedFileMetadata } from "@/lib/document-file";

export type MinistryProgressReportIssueStatus =
  | "Solved"
  | "In Progress"
  | "Not Addressed";

export type MinistryProgressReportIssueRow = {
  id: number;
  issueStatusId?: number;
  hasProgressUpdate?: boolean;
  cdcComment?: {
    id: number;
    commentTypeId: number;
    commentType: {
      id: number;
      name: string;
    };
    comment: string;
    author: {
      id: number;
      name: string | null;
    };
    createdAt: string;
    updatedAt: string;
  } | null;
  pswg: string;
  issue: string;
  category: string;
  issueDescription: string;
  recommendation: string;
  rgcDecision: string;
  status: MinistryProgressReportIssueStatus;
  progressSolution: string;
  indicators: string;
  dateOfIssueSolution: string;
  sourceOfVerification: string;
  linkToVerificationSource: string;
  implementationChallenges: string;
  request: string;
  nextStep: string;
  progressUpdateAttachment?: UploadedFileMetadata | null;
  primaryAgency: string;
  primaryAgencyLogo?: string | null;
  secondAgency: string;
  secondAgencyLogo?: string | null;
  thirdAgency: string;
  thirdAgencyLogo?: string | null;
  fourthAgency: string;
  fourthAgencyLogo?: string | null;
  fifthAgency: string;
  fifthAgencyLogo?: string | null;
};

export const MINISTRY_PROGRESS_REPORT_ISSUE_TABLE_CONFIG = {
  minWidth: 6927,
  rowHeight: 60,
  headerHeight: 50,
} as const;

export const ministryProgressReportIssueRows: MinistryProgressReportIssueRow[] =
  [
    {
      id: 1,
      issueStatusId: 1,
      pswg: "PSWG-A",
      issue: "Import of frozen meat and offal",
      category: "Trade",
      issueDescription:
        "The private sector state that given the current situation, livestock production in Cambodia has sufficient capacity to supply market demand. The import of offal and frozen meat from outside will continue to affecting domestic livestock production in Cambodia.",
      recommendation:
        "The private sector requests government to stop import of frozen offal.",
      rgcDecision:
        "The Royal Government of Cambodia has amended Sub-Decree No. 17 to issue a new Sub-Decree No. 370 that addresses this issue. The Ministry of Commerce and the MAFF issued two Notifications to address this: the first Notification from 12 March to 12 September 2024; the second Notification dated 12 September 2024 to 12 March 2025.",
      status: "In Progress",
      progressSolution: "No data",
      indicators: "No data",
      dateOfIssueSolution: "No data",
      sourceOfVerification: "No data",
      linkToVerificationSource: "No data",
      implementationChallenges: "No data",
      request: "No data",
      nextStep: "No data",
      progressUpdateAttachment: null,
      primaryAgency: "MAFF",
      primaryAgencyLogo: "/images/logo/maff.png",
      secondAgency: "No data",
      thirdAgency: "No data",
      fourthAgency: "No data",
      fifthAgency: "No data",
    },
    {
      id: 2,
      issueStatusId: 1,
      pswg: "PSWG-A",
      issue: "Climate issue",
      category: "Governance",
      issueDescription:
        "The private sector stated that cultivation is largely dependent on the weather (rain), and the private sector also observed that the Ministry of Water Resources and Meteorology often issues announcements regarding weather forecasting nationwide, which results in farmers in each region not receiving clear information.",
      recommendation:
        "The private sector requests the Ministry of Water Resources and Meteorology to provide weather forecasting information specifically for each region and agricultural area.",
      rgcDecision:
        "His Excellency the Deputy Prime Minister, Minister of Economy and Finance, and Chairman of the Steering Committee of the Government-Private Sector Forum, has instructed the Ministry of Water Resources and Meteorology to take the private sector’s recommendations into consideration.",
      status: "Solved",
      progressSolution:
        "The Ministry of Water Resources and Meteorology has improved the weather forecast system and made it available for public access.",
      indicators: "Weather alert system / farmer notification mechanism",
      dateOfIssueSolution: "June 07, 2025",
      sourceOfVerification: "Ministry announcement",
      linkToVerificationSource: "https://example.com",
      implementationChallenges:
        "Some rural areas still have limited access to information.",
      request: "Continue improving regional weather information delivery.",
      nextStep: "Monitor regional weather information delivery channels.",
      progressUpdateAttachment: null,
      primaryAgency: "MAFF",
      primaryAgencyLogo: "/images/logo/maff.png",
      secondAgency: "No data",
      thirdAgency: "No data",
      fourthAgency: "No data",
      fifthAgency: "No data",
    },
    {
      id: 3,
      issueStatusId: 1,
      pswg: "PSWG-A",
      issue: "Joint inspection",
      category: "Procedure",
      issueDescription:
        "The private sector said that the Economic Land Concession and inspection procedure should be improved.",
      recommendation:
        "Prepare a clearer joint inspection procedure and reduce duplicated inspections.",
      rgcDecision:
        "Relevant institutions shall discuss and improve the inspection procedure.",
      status: "Not Addressed",
      progressSolution: "No data",
      indicators: "No data",
      dateOfIssueSolution: "No data",
      sourceOfVerification: "No data",
      linkToVerificationSource: "No data",
      implementationChallenges: "No data",
      request: "No data",
      nextStep: "No data",
      progressUpdateAttachment: null,
      primaryAgency: "MAFF",
      primaryAgencyLogo: "/images/logo/maff.png",
      secondAgency: "No data",
      thirdAgency: "No data",
      fourthAgency: "No data",
      fifthAgency: "No data",
    },
  ];
