export type WgIssuesFilterOption = {
  label: string;
  width: number;
};

export type WgIssuesStatsCard = {
  label: string;
  value: string;
  backgroundColor: string;
  borderColor: string;
};

export const wgIssuesFilters: WgIssuesFilterOption[] = [
  { label: "All Status", width: 134 },
  { label: "Category", width: 118 },
  { label: "Primary Agency", width: 159 },
  { label: "Year", width: 124 },
  { label: "Progress Report", width: 161 },
  { label: "Attachment", width: 133 },
];

export const wgIssuesStatsCards: WgIssuesStatsCard[] = [
  {
    label: "Total Issues",
    value: "20",
    backgroundColor: "#ddedfb",
    borderColor: "#b6dbf6",
  },
  {
    label: "Solved",
    value: "15/20",
    backgroundColor: "#ecfdf3",
    borderColor: "#d1fadf",
  },
  {
    label: "In Progress",
    value: "4/20",
    backgroundColor: "#fffaeb",
    borderColor: "#fef0c7",
  },
  {
    label: "Not Addressed",
    value: "1/20",
    backgroundColor: "#fef3f2",
    borderColor: "#fee4e2",
  },
];

export type IssueStatus =
  | "Solved"
  | "In Progress"
  | "Not Addressed"
  | "Draft"
  | "Saved"
  | "New Submission";

export type IssueRow = {
  id: number;
  issue: string;
  category: string;
  description: string;
  recommendation: string;
  governmentDecision: string;
  hasAttachment?: boolean;
  status: IssueStatus;
  primaryAgency: string;
  primaryAgencyLogo?: string | null;
  issueReference: string;
  solutionReference?: string;
  submittedDate?: string | null;
  year?: string | null;
};

const wgAIssueSeedRows: Omit<IssueRow, "id">[] = [
  {
    issue: "Import of frozen meat and offal",
    category: "Trade",
    description:
      "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.",
    governmentDecision:
      "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.",
    status: "In Progress",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា A",
  },
  {
    issue: "Climate issue",
    category: "Governance",
    description:
      "The private sector stated that cultivation is largely dependent on climate conditions and weather change.",
    recommendation:
      "The private sector, through the Ministry of Agriculture and relevant institutions, requests stronger climate adaptation support.",
    governmentDecision: "No Data",
    status: "Solved",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា C",
    solutionReference: "ដំណោះស្រាយ C",
  },
  {
    issue: "Data related to agriculture, livestocks, and fisheries",
    category: "Market",
    description:
      "The private sector cited that there is lack of annual data for planning and investment decisions.",
    recommendation:
      "The private sector requests the Ministry of Agriculture to improve annual reporting and shared access.",
    governmentDecision:
      "The Ministry of Agriculture, Forestry and Fisheries will set clear coordination for data collection and annual reporting.",
    status: "Draft",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា D",
  },
  {
    issue: "Joint inspection",
    category: "Procedure",
    description:
      "The private sector said that the Economic Land Concession procedures remain slow and unclear.",
    recommendation:
      "The private sector requests relevant institutions to cooperate and simplify the inspection flow.",
    governmentDecision:
      "The Ministry of Agriculture, Forestry and Fisheries and related institutions are reviewing the joint inspection process.",
    status: "New Submission",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា E",
  },
  {
    issue: "A committee to support the Cambodian aquaculture sector",
    category: "Policy",
    description:
      "Currently, support from relevant institutions in the aquaculture sector remains fragmented.",
    recommendation:
      "The private sector requests the Ministry of Agriculture to establish a clear inter-ministerial committee.",
    governmentDecision:
      "The private sector requests the Ministry of Agriculture, Forestry and Fisheries to establish stronger coordination and support.",
    status: "Solved",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា F",
    solutionReference: "ដំណោះស្រាយ D",
  },
  {
    issue: "To exempt VAT (10%) for livestock sector inputs",
    category: "Taxation",
    description:
      "The private sector state that the livestock sector spends heavily on imported inputs and feed.",
    recommendation:
      "The private sector requests government to exempt VAT on key livestock inputs.",
    governmentDecision:
      "This issue is to be forwarded to the General Department of Taxation for further review.",
    status: "In Progress",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា G",
  },
  {
    issue: "Organizing agricultural communities.",
    category: "Human Resource",
    description: "Not available",
    recommendation: "Not available",
    governmentDecision:
      "(7.3.3) Entrust His Excellency Din Tina, Minister of Agriculture, Forestry, and Fisheries, to continue organizing agricultural communities.",
    status: "Not Addressed",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា H",
  },
  {
    issue: "Issue for local aquaculture production",
    category: "Governance",
    description:
      "The private sector said that currently, aquaculture production in Cambodia can produce sufficient fish to supply the local market, but not every month.",
    recommendation:
      "The private sector requests the government to: 1. Improve fish breeds and breeding support. 2. Boost local fish feed production. 3. Extend electricity incentives for producers.",
    governmentDecision:
      "MAFF Minister decided the following: 1. Establish a committee to support Cambodian aquaculture. 2. Establish an inter-ministerial mechanism to support the domestic fishery market.",
    status: "Draft",
    primaryAgency: "MAFF",
    issueReference: "បញ្ហា I",
  },
];

export const wgAIssueRows: IssueRow[] = Array.from({ length: 80 }, (_, index) => {
  const row = wgAIssueSeedRows[index % wgAIssueSeedRows.length];

  return {
    id: index + 1,
    ...row,
  };
});
