// Mock data for Daraja (Airtel Jobs PWA)

export const jobCategories = [
  "Driver", "Security", "Domestic Worker", "Cook", "Cleaner",
  "Construction", "Mechanic", "Electrician", "Plumber", "Tailor",
  "Salesperson", "Waiter", "Delivery", "Farm Worker", "Office Assistant",
];

export const regions = [
  "Dar es Salaam", "Temeke", "Kariakoo", "Kinondoni", "Ilala",
  "Mwanza", "Arusha", "Dodoma", "Tanga", "Morogoro",
  "Mbeya", "Zanzibar", "Iringa", "Kigoma", "Tabora",
];

export const workTypes = ["Full-time", "Part-time", "Gig"];

export const employerTypes = ["Company", "Individual", "Household"];

export const industrySectors = [
  "Transport", "Security", "Domestic", "Construction",
  "Hospitality", "Agriculture", "Retail", "Manufacturing",
];

export const companySizes = ["Small", "Medium", "Large"];

export interface Job {
  id: string;
  title: string;
  category: string;
  location: string;
  payRate: string;
  workType: string;
  employer: string;
  employerVerified?: boolean;
  employerIndustry?: string;
  positions: number;
  deadline: string;
  postedAt: string;
  applicants: number;
  description: string;
}

export interface Application {
  id: string;
  jobTitle: string;
  employer: string;
  location: string;
  payRate: string;
  appliedAt: string;
  status: "pending" | "interview" | "hired" | "rejected";
}

export interface Applicant {
  id: string;
  name: string;
  phone: string;
  category: string;
  location: string;
  workType: string;
  hasPhoto: boolean;
  hasCertificates: boolean;
  appliedAt: string;
}

export interface LeaderboardEntry {
  rank: number;
  name: string;
  metric: number;
  prize: string;
}

export const mockJobs: Job[] = [
  {
    id: "j1", title: "Driver", category: "Driver", location: "Temeke",
    payRate: "TZS 20,000/day", workType: "Full-time", employer: "Bakhresa Group", employerVerified: true, employerIndustry: "Transport",
    positions: 3, deadline: "5 days", postedAt: "2 hours ago", applicants: 24,
    description: "Experienced driver needed for delivery routes in Temeke area.",
  },
  {
    id: "j2", title: "Security Guard", category: "Security", location: "Kariakoo",
    payRate: "TZS 25,000/day", workType: "Full-time", employer: "Azam Security", employerVerified: true, employerIndustry: "Security",
    positions: 2, deadline: "3 days", postedAt: "5 hours ago", applicants: 18,
    description: "Night shift security guard for commercial building.",
  },
  {
    id: "j3", title: "House Cleaner", category: "Cleaner", location: "Kinondoni",
    payRate: "TZS 15,000/day", workType: "Part-time", employer: "Happy Homes", employerVerified: false, employerIndustry: "Domestic",
    positions: 5, deadline: "5 days", postedAt: "1 day ago", applicants: 32,
    description: "Residential cleaning services needed twice a week.",
  },
  {
    id: "j4", title: "Cook", category: "Cook", location: "Ilala",
    payRate: "TZS 30,000/day", workType: "Full-time", employer: "Serena Hotel", employerVerified: true, employerIndustry: "Hospitality",
    positions: 2, deadline: "4 days", postedAt: "3 hours ago", applicants: 12,
    description: "Hotel kitchen cook with experience in continental cuisine.",
  },
  {
    id: "j5", title: "Farm Worker", category: "Farm Worker", location: "Morogoro",
    payRate: "TZS 12,000/day", workType: "Gig", employer: "Green Fields Ltd", employerVerified: true, employerIndustry: "Agriculture",
    positions: 10, deadline: "5 days", postedAt: "1 day ago", applicants: 45,
    description: "Seasonal farm workers needed for harvest season.",
  },
];

export const mockApplications: Application[] = [
  {
    id: "a1", jobTitle: "Driver", employer: "Bakhresa Group", location: "Temeke",
    payRate: "TZS 20,000/day", appliedAt: "2 days ago", status: "interview",
  },
  {
    id: "a2", jobTitle: "Security Guard", employer: "Azam Security", location: "Kariakoo",
    payRate: "TZS 25,000/day", appliedAt: "3 days ago", status: "pending",
  },
  {
    id: "a3", jobTitle: "Delivery Driver", employer: "Jumia Tanzania", location: "Dar es Salaam",
    payRate: "TZS 18,000/day", appliedAt: "1 week ago", status: "hired",
  },
  {
    id: "a4", jobTitle: "Mechanic", employer: "Auto Fix TZ", location: "Ilala",
    payRate: "TZS 22,000/day", appliedAt: "1 week ago", status: "rejected",
  },
];

export const mockApplicants: Applicant[] = [
  { id: "ap1", name: "Juma Mohamed", phone: "+255 712 345 678", category: "Driver", location: "Temeke", workType: "Full-time", hasPhoto: true, hasCertificates: true, appliedAt: "1 hour ago" },
  { id: "ap2", name: "Ali Hassan", phone: "+255 713 456 789", category: "Driver", location: "Kariakoo", workType: "Full-time", hasPhoto: true, hasCertificates: false, appliedAt: "3 hours ago" },
  { id: "ap3", name: "Fatma Said", phone: "+255 714 567 890", category: "Driver", location: "Temeke", workType: "Full-time", hasPhoto: false, hasCertificates: false, appliedAt: "5 hours ago" },
  { id: "ap4", name: "Hussein Bakari", phone: "+255 715 678 901", category: "Driver", location: "Ilala", workType: "Full-time", hasPhoto: true, hasCertificates: true, appliedAt: "1 day ago" },
  { id: "ap5", name: "Amina Rashid", phone: "+255 716 789 012", category: "Driver", location: "Kinondoni", workType: "Part-time", hasPhoto: true, hasCertificates: false, appliedAt: "1 day ago" },
];

export const seekerLeaderboard: LeaderboardEntry[] = [
  { rank: 1, name: "Juma Mohamed", metric: 15, prize: "TZS 50,000" },
  { rank: 2, name: "Ali Hassan", metric: 12, prize: "TZS 30,000" },
  { rank: 3, name: "Fatma Said", metric: 10, prize: "TZS 20,000" },
  { rank: 4, name: "Hussein B.", metric: 8, prize: "TZS 5,000" },
  { rank: 5, name: "Amina R.", metric: 7, prize: "TZS 5,000" },
  { rank: 6, name: "Rashid K.", metric: 6, prize: "TZS 5,000" },
  { rank: 7, name: "Saida M.", metric: 5, prize: "TZS 5,000" },
];

export const employerLeaderboard: LeaderboardEntry[] = [
  { rank: 1, name: "Bakhresa Group", metric: 12, prize: "TZS 100,000" },
  { rank: 2, name: "Azam Media", metric: 8, prize: "TZS 50,000" },
  { rank: 3, name: "Serena Hotel", metric: 6, prize: "TZS 25,000" },
  { rank: 4, name: "CRDB Bank", metric: 5, prize: "TZS 10,000" },
  { rank: 5, name: "Vodacom TZ", metric: 4, prize: "TZS 10,000" },
];

export const referralLeaderboard: LeaderboardEntry[] = [
  { rank: 1, name: "Baraka Juma", metric: 25, prize: "TZS 40,000" },
  { rank: 2, name: "Grace Mwita", metric: 18, prize: "TZS 25,000" },
  { rank: 3, name: "Peter Kahema", metric: 14, prize: "TZS 15,000" },
  { rank: 4, name: "Neema Amos", metric: 10, prize: "TZS 5,000" },
  { rank: 5, name: "David Nyerere", metric: 8, prize: "TZS 5,000" },
];

// Current user mock data
export const seekerProfile = {
  name: "Juma",
  fullName: "Juma Mohamed",
  phone: "+255 712 345 678",
  category: "Driver",
  location: "Temeke",
  workType: "Full-time" as const,
  referralCode: "JUMA123",
  cashEarned: 8500,
  freeApplications: 2,
  applicationsMade: 12,
  friendsReferred: 3,
  leaderboardPosition: 7,
};

export const employerProfile = {
  name: "Bakhresa",
  companyName: "Bakhresa Group",
  phone: "+255 222 123 456",
  referralCode: "BAKHRESA01",
  employerType: "Company" as const,
  industry: "Transport",
  size: "Large" as const,
  isVerified: true,
  jobsPosted: 8,
  peopleHired: 5,
  freePosts: 2,
  discount: 15,
  cashEarned: 20000,
  totalSaved: 45000,
  employersReferred: 5,
  leaderboardPosition: 3,
};

export const seekerRewards = {
  cashEarned: 8500,
  freeApplications: 2,
  nextMilestones: [
    { label: "5 more apps", reward: "Get 1 FREE app" },
    { label: "2 more referrals", reward: "Get TZS 2,500 bonus" },
    { label: "Login 30 days straight", reward: "Get TZS 5,000" },
  ],
  cashBonuses: [
    { label: "Complete profile (photo)", amount: "TZS 1,000", status: "claimable" as const },
    { label: "Get hired", amount: "TZS 2,000", status: "locked" as const },
  ],
};

export const employerRewards = {
  cashEarned: 20000,
  freePosts: 2,
  discount: 15,
  nextMilestones: [
    { label: "Post 2 more jobs", reward: "Get 1 FREE post" },
    { label: "Hire 5 more people", reward: "20% discount forever" },
    { label: "Refer 5 more employers", reward: "TZS 40,000 bonus" },
  ],
  cashBonuses: [
    { label: "Complete verification", amount: "TZS 5,000", status: "claimable" as const },
    { label: "Post 5 jobs this month", amount: "TZS 10,000", status: "in_progress" as const },
  ],
};

export const weeklyWinners = {
  seekerApplications: [
    { name: "Juma Mohamed", metric: "15 apps", prize: "TZS 50,000" },
    { name: "Ali Hassan", metric: "12 apps", prize: "TZS 30,000" },
    { name: "Fatma Said", metric: "10 apps", prize: "TZS 20,000" },
  ],
  seekerReferrals: [
    { name: "Baraka Juma", metric: "25 refs", prize: "TZS 40,000" },
    { name: "Grace Mwita", metric: "18 refs", prize: "TZS 25,000" },
  ],
  employerPosts: [
    { name: "Bakhresa Group", metric: "12 jobs", prize: "TZS 100,000" },
    { name: "Azam Media", metric: "8 jobs", prize: "TZS 50,000" },
  ],
};
