export const menuItems = [
  {
   title: "Task List",
   icon: "heroicons-outline:home",
   isOpen: true,
   isHide: true,
   link: "dashboard",
  },
  {
    title: "Arrange Jobs",
    icon: "heroicons-outline:calendar-days",
    link: "#",
    isHide: true,
    permissionKey: "ArrangeJobs",
    child: [
      {
        childtitle: "All",
        childlink: "tasks/all",
        permissionKey: "Lists",
      },
      {
        childtitle: "TH",
        childlink: "tasks/th",
        permissionKey: "Pending",
      },
      {
        childtitle: "TL",
        childlink: "tasks/tl",
        permissionKey: "Confirmed",
      },
      {
        childtitle: "FLSS",
        childlink: "tasks/flss",
        permissionKey: "Confirmed",
      },
      {
        childtitle: "LM",
        childlink: "tasks/lm",
        permissionKey: "Confirmed",
      },
      {
        childtitle: "TP",
        childlink: "tasks/tp",
        permissionKey: "Confirmed",
      },
    ],
  },
  {
    title: "Task Board",
    icon: "heroicons-outline:clipboard-document-list",
    link: "#",
    isHide: true,
    permissionKey: "TaskBoard",
    child: [
      {
        childtitle: "All",
        childlink: "taskboards/all",
        permissionKey: "Lists",
      },
      {
        childtitle: "TH",
        childlink: "taskboards/th",
        permissionKey: "Pending",
      },
      {
        childtitle: "TL",
        childlink: "taskboards/tl",
        permissionKey: "Confirmed",
      },
      {
        childtitle: "FLSS",
        childlink: "taskboards/flss",
        permissionKey: "Confirmed",
      },
      {
        childtitle: "LM",
        childlink: "taskboards/lm",
        permissionKey: "Confirmed",
      },
      {
        childtitle: "TP",
        childlink: "taskboards/tp",
        permissionKey: "Confirmed",
      },
    ],
  },
];

export const topMenu = [];

export const initialCasesSeed = (() => {
  const today = new Date().toISOString().split("T")[0]; // YYYY-MM-DD
  const thicknesses = ["5mm", "6mm", "8mm", "10mm", "12mm"];
  const randomDetail = () => {
    const thickness = thicknesses[Math.floor(Math.random() * thicknesses.length)];
    const pcs = Math.floor(Math.random() * 21) + 5; // 5–25 pieces
    return `${thickness} x ${pcs}(s) PC`;
  };

  return [
    {
      id: "UC-1026",
      order: "100277",
      category: "FLSS",
      name: "VIP Facade Install",
      requested: "2025-10-02",
      priority: "High",
      status: "Pending",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1030",
      order: "100280",
      category: "TH",
      name: "Aluminium Adjustment",
      requested: "2025-10-10",
      priority: "Medium",
      status: "Scheduled",
      scheduled: "2025-11-03T15:00",
      order_details: randomDetail(),
    },
    {
      id: "UC-1031",
      order: "100281",
      category: "TP",
      name: "Glass Replacement",
      requested: "2025-10-12",
      priority: "High",
      status: "Approved",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1032",
      order: "100282",
      category: "LM",
      name: "Wood Frame Seal",
      requested: "2025-10-13",
      priority: "Low",
      status: "Rejected",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1033",
      order: "100283",
      category: "TL",
      name: "AC Duct Repair",
      requested: "2025-10-15",
      priority: "Low",
      status: "Scheduled",
      scheduled: "2025-11-03T15:30",
      order_details: randomDetail(),
    },
    {
      id: "UC-1034",
      order: "100284",
      category: "TP",
      name: "Glass Panel Polishing",
      requested: "2025-10-20",
      priority: "Medium",
      status: "Approved",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1035",
      order: "100285",
      category: "FLSS",
      name: "Smoke Detector Check",
      requested: "2025-10-28",
      priority: "Low",
      status: "Pending",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1036",
      order: "100286",
      category: "TH",
      name: "Heater Temperature Calibration",
      requested: "2025-11-01",
      priority: "High",
      status: "Approved",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1037",
      order: "100287",
      category: "LM",
      name: "Main Lobby Painting Touch-Up",
      requested: "2025-11-02",
      priority: "Medium",
      status: "Pending",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1038",
      order: "100288",
      category: "FLSS",
      name: "Fire Hose Cabinet Maintenance",
      requested: today,
      priority: "High",
      status: "Scheduled",
      scheduled: "2025-11-03T10:00",
      order_details: randomDetail(),
    },
    {
      id: "UC-1039",
      order: "100289",
      category: "TP",
      name: "Glass Door Alignment",
      requested: today,
      priority: "Medium",
      status: "Approved",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1040",
      order: "100290",
      category: "TH",
      name: "Chiller Unit Sensor Replacement",
      requested: today,
      priority: "High",
      status: "Pending",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1041",
      order: "100291",
      category: "TL",
      name: "Lighting Circuit Inspection",
      requested: today,
      priority: "Low",
      status: "Pending",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1042",
      order: "100292",
      category: "LM",
      name: "Ceiling Crack Patching",
      requested: "2025-11-05",
      priority: "Medium",
      status: "Scheduled",
      scheduled: "2025-11-04T10:00",
      order_details: randomDetail(),
    },
    {
      id: "UC-1043",
      order: "100293",
      category: "TP",
      name: "Mirror Replacement (Washroom)",
      requested: "2025-11-07",
      priority: "Low",
      status: "Rejected",
      scheduled: "",
      order_details: randomDetail(),
    },
    {
      id: "UC-1044",
      order: "100294",
      category: "FLSS",
      name: "Sprinkler Pressure Test",
      requested: "2025-11-06",
      priority: "High",
      status: "Scheduled",
      scheduled: "2025-11-06T14:00",
      order_details: randomDetail(),
    },
  ];
})();



export const colors = {
  primary: "#4669FA",
  secondary: "#A0AEC0",
  danger: "#F1595C",
  black: "#111112",
  warning: "#FA916B",
  info: "#0CE7FA",
  light: "#425466",
  success: "#50C793",
  "gray-f7": "#F7F8FC",
  dark: "#1E293B",
  "dark-gray": "#0F172A",
  gray: "#68768A",
  gray2: "#EEF1F9",
  "dark-light": "#CBD5E1",
};

export const hexToRGB = (hex, alpha) => {
  var r = parseInt(hex.slice(1, 3), 16),
    g = parseInt(hex.slice(3, 5), 16),
    b = parseInt(hex.slice(5, 7), 16);

  if (alpha) {
    return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")";
  } else {
    return "rgb(" + r + ", " + g + ", " + b + ")";
  }
};