export interface User {
  id: string;
  name: string;
  email: string;
  phone: string;
  role: 'biker' | 'super_admin' | 'admin_manager' | 'staff' | 'accountant' | 'investor' | 'swapstation' | 'merchant';
  avatar?: string;
  status: 'active' | 'pending' | 'inactive';
  createdAt: string;
}

export interface Bike {
  id: string;
  model: string;
  brand: string;
  image: string;
  plateNumber: string;
  status: 'available' | 'rented' | 'maintenance' | 'retired';
  batteryLevel: number;
  location: string;
  assignedTo?: string;
  investorId?: string;
  investmentId?: string;
  rentalType?: 'single_rent' | 'rent_to_own' | 'share_ev';
  purchasePrice?: number;
  purchaseDate?: string;
  currentRent?: number;
  totalEarnings?: number;
  assignmentHistory?: BikeAssignment[];
}

export interface BikeAssignment {
  id: string;
  bikeId: string;
  bikerId: string;
  bikerName: string;
  assignedAt: string;
  assignedBy: string;
  unassignedAt?: string;
  unassignedBy?: string;
  reason?: string;
  status: 'active' | 'completed';
  notes?: string;
}

export interface Rental {
  id: string;
  bikeId: string;
  investorId: string;
  userId: string;
  bikerName: string;
  type: 'single' | 'shared' | 'rent-to-own';
  status: 'active' | 'pending' | 'completed' | 'disputed';
  startDate: string;
  endDate?: string;
  deposit: number;
  dailyRate: number;
  totalPaid: number;
}

export interface RentalPayment {
  id: string;
  rentalId: string;
  bikeId: string;
  investorId: string;
  bikeModel: string;
  plateNumber: string;
  bikerId: string;
  bikerName: string;
  date: string;
  amount: number;
  duration: string;
  planType: string;
  status: 'paid' | 'pending' | 'failed';
  paymentMethod: 'cash' | 'mobile' | 'bank';
  transactionId?: string;
}

export interface Transaction {
  id: string;
  userId?: string;
  investorId?: string;
  bikeId?: string;
  type: 'rental_payment' | 'deposit' | 'withdrawal' | 'topup' | 'earning' | 'refund' | 'investment' | 'investment_return' | 'bike_earning' | 'referral_bonus' | 'penalty' | 'adjustment';
  amount: number;
  status: 'completed' | 'pending' | 'failed' | 'cancelled';
  description: string;
  paymentMethod?: 'bank' | 'mobile' | 'cash' | 'cheque';
  referenceNumber?: string;
  createdAt: string;
  processedAt?: string;
}

export interface InvestmentPlan {
  id: string;
  investorId: string;
  planName: string;
  planType: 'silver' | 'gold' | 'platinum' | 'diamond';
  bikeIds?: string[];
  batteryIds?: string[];
  assetType?: 'bike' | 'battery';
  totalInvestment: number;
  monthlyReturn: number;
  expectedRoi: number;
  actualEarnings: number;
  startDate: string;
  endDate?: string;
  status: 'active' | 'completed' | 'cancelled' | 'pending';
  paymentMethod: 'bank' | 'mobile' | 'cash' | 'cheque';
  transactionId?: string;
  notes?: string;
  durationMonths?: number;
  lockInMonths?: number;
  exitPenaltyPercent?: number;
  createdAt: string;
}

export interface Investor {
  id: string;
  userId: string;
  name: string;
  email: string;
  phone: string;
  phoneAlt?: string;
  address: string;
  dateOfBirth?: string;
  gender?: string;
  occupation?: string;
  nidNumber?: string;
  nidFront?: string;
  nidBack?: string;
  passportNumber?: string;
  tinNumber?: string;
  bankName?: string;
  bankAccountName?: string;
  bankAccountNumber?: string;
  bankBranch?: string;
  bankRouting?: string;
  bankAccounts?: { id: string; bankName: string; accountName: string; accountNumber: string; branch?: string; routing?: string; isPrimary: boolean; verified?: boolean }[];
  mobileBanking?: string;
  mobileBankingNumber?: string;
  mobileBankingVerified?: boolean;
  additionalMobileBanking?: { provider: string; number: string; verified: boolean }[];
  emergencyContactName?: string;
  emergencyContactRelation?: string;
  emergencyContactPhone?: string;
  totalInvested: number;
  totalEarnings: number;
  activeBikes: number;
  withdrawalPending: number;
  totalWithdrawn: number;
  pendingEarnings: number;
  roi: number;
  status: 'active' | 'pending' | 'inactive' | 'suspended';
  notes?: string;
  createdAt: string;
  updatedAt?: string;
  kycStatus: 'verified' | 'pending' | 'rejected' | 'not_submitted';
  kycSubmittedAt?: string;
  kycDocuments?: { type: string; number?: string; url?: string; verified: boolean; uploadedAt?: string }[];
  riskLevel: 'low' | 'medium' | 'high';
  referralCode?: string;
  referredBy?: string;
  totalReferrals: number;
  referralEarnings: number;
  investments: InvestmentPlan[];
}

export interface KYCRequest {
  id: string;
  userId: string;
  userName: string;
  phone: string;
  submittedAt: string;
  status: 'pending' | 'approved' | 'rejected';
}

export interface Delivery {
  id: string;
  shopId: string;
  riderId: string;
  status: 'pending' | 'in_progress' | 'completed';
  pickupLocation: string;
  dropoffLocation: string;
  createdAt: string;
}

export const users: User[] = [
  { id: 'u0', name: 'Super Admin', email: 'superadmin@jaiben.com', phone: '01710000000', role: 'super_admin', status: 'active', createdAt: '2023-01-01' },
  { id: 'u1', name: 'Rahim Ahmed', email: 'rahim@email.com', phone: '01712345678', role: 'biker', status: 'active', createdAt: '2024-01-15' },
  { id: 'u2', name: 'Karim Hasan', email: 'karim@email.com', phone: '01712345679', role: 'biker', status: 'active', createdAt: '2024-02-20' },
  { id: 'u3', name: 'Admin Manager', email: 'adminmanager@jaiben.com', phone: '01710000001', role: 'admin_manager', status: 'active', createdAt: '2023-06-01' },
  { id: 'u4', name: 'Manager User', email: 'manager@jaiben.com', phone: '01710000002', role: 'admin_manager', status: 'active', createdAt: '2023-06-01' },
  { id: 'u5', name: 'Staff User', email: 'staff@jaiben.com', phone: '01710000003', role: 'staff', status: 'active', createdAt: '2023-07-01' },
  { id: 'u6', name: 'Accountant User', email: 'accountant@jaiben.com', phone: '01710000004', role: 'accountant', status: 'active', createdAt: '2023-07-01' },
  { id: 'u7', name: 'Investor User', email: 'investor@email.com', phone: '01720000001', role: 'investor', status: 'active', createdAt: '2023-08-01' },
  { id: 'u8', name: 'Swap Station Owner', email: 'swap@jaiben.com', phone: '01730000001', role: 'swapstation', status: 'active', createdAt: '2023-09-01' },
  { id: 'u9', name: 'Merchant User', email: 'merchant@email.com', phone: '01740000001', role: 'merchant', status: 'active', createdAt: '2023-10-01' },
];

export const bikes: Bike[] = [
  {
    id: 'EV001', model: 'Etron ET50', brand: 'Etron', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-1234', status: 'rented', batteryLevel: 78, location: 'Gulshan 1', assignedTo: 'u1', investorId: 'inv1', investmentId: 'ip1', rentalType: 'single_rent', purchasePrice: 85000, purchaseDate: '2024-01-15', currentRent: 350, totalEarnings: 114250,
    assignmentHistory: [
      { id: 'ash1', bikeId: 'EV001', bikerId: 'u3', bikerName: 'Rahim Khan', assignedAt: '2024-01-20 10:30:00', assignedBy: 'admin1', unassignedAt: '2024-02-15 14:20:00', unassignedBy: 'admin1', reason: 'Bike transfer to another biker', status: 'completed', notes: 'Initial assignment' },
      { id: 'ash2', bikeId: 'EV001', bikerId: 'u1', bikerName: 'Karim Ahmed', assignedAt: '2024-02-15 15:00:00', assignedBy: 'admin1', status: 'active', notes: 'Reassigned after maintenance' }
    ]
  },
  {
    id: 'EV002', model: 'Yadea DT3', brand: 'Yadea', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-5678', status: 'available', batteryLevel: 95, location: 'Banani', investorId: 'inv1', investmentId: 'ip2', rentalType: 'rent_to_own', purchasePrice: 65000, purchaseDate: '2024-01-20', currentRent: 0, totalEarnings: 12750,
    assignmentHistory: [
      { id: 'ash3', bikeId: 'EV002', bikerId: 'u1', bikerName: 'Karim Ahmed', assignedAt: '2024-01-25 09:00:00', assignedBy: 'admin1', unassignedAt: '2024-03-01 11:30:00', unassignedBy: 'admin1', reason: 'Rental completed', status: 'completed', notes: 'First rental period' }
    ]
  },
  {
    id: 'EV003', model: 'AIMA Lightning', brand: 'AIMA', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-9012', status: 'rented', batteryLevel: 62, location: 'Uttara', assignedTo: 'u2', investorId: 'inv2', purchasePrice: 95000, purchaseDate: '2023-11-05', currentRent: 450, totalEarnings: 22500,
    assignmentHistory: [
      { id: 'ash4', bikeId: 'EV003', bikerId: 'u4', bikerName: 'Jamal Hossain', assignedAt: '2023-11-10 08:00:00', assignedBy: 'admin1', unassignedAt: '2024-01-05 16:00:00', unassignedBy: 'admin1', reason: 'Bike returned for maintenance', status: 'completed' },
      { id: 'ash5', bikeId: 'EV003', bikerId: 'u2', bikerName: 'Sofiq Rahman', assignedAt: '2024-01-10 10:00:00', assignedBy: 'admin1', status: 'active', notes: 'Rent-to-own agreement' }
    ]
  },
  {
    id: 'EV004', model: 'TVS iQube', brand: 'TVS', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-3456', status: 'maintenance', batteryLevel: 45, location: 'Workshop', investorId: 'inv2', purchasePrice: 72000, purchaseDate: '2023-12-01', currentRent: 0, totalEarnings: 8500,
    assignmentHistory: [
      { id: 'ash6', bikeId: 'EV004', bikerId: 'u5', bikerName: 'Ripon Mia', assignedAt: '2023-12-05 12:00:00', assignedBy: 'admin1', unassignedAt: '2024-03-10 09:00:00', unassignedBy: 'admin1', reason: 'Battery replacement - under maintenance', status: 'completed', notes: 'Battery damaged, sent to workshop' }
    ]
  },
  {
    id: 'EV005', model: 'Bajaj Chetak', brand: 'Bajaj', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-7890', status: 'available', batteryLevel: 100, location: 'Dhanmondi', investorId: 'inv2', purchasePrice: 68000, purchaseDate: '2023-11-10', currentRent: 0, totalEarnings: 20000,
    assignmentHistory: [
      { id: 'ash7', bikeId: 'EV005', bikerId: 'u6', bikerName: 'Mizanur Rahman', assignedAt: '2023-11-15 14:00:00', assignedBy: 'admin1', unassignedAt: '2024-02-20 10:30:00', unassignedBy: 'admin1', reason: 'Biker requested return', status: 'completed', notes: 'Returned in good condition' }
    ]
  },
  {
    id: 'EV006', model: 'Hero Photon', brand: 'Hero', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-1111', status: 'rented', batteryLevel: 88, location: 'Mirpur', investorId: 'inv2', purchasePrice: 55000, purchaseDate: '2024-02-01', currentRent: 300, totalEarnings: 4500,
    assignmentHistory: [
      { id: 'ash8', bikeId: 'EV006', bikerId: 'u7', bikerName: 'Alamin Hossain', assignedAt: '2024-02-05 11:00:00', assignedBy: 'admin1', status: 'active' }
    ]
  },
  {
    id: 'EV007', model: 'Okinawa Praise', brand: 'Okinawa', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-2222', status: 'available', batteryLevel: 92, location: 'Gulshan 2', investorId: 'inv3', purchasePrice: 75000, purchaseDate: '2024-02-10', currentRent: 0, totalEarnings: 9500,
    assignmentHistory: []
  },
  {
    id: 'EV008', model: 'Bajaj Chetak', brand: 'Bajaj', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-3333', status: 'available', batteryLevel: 100, location: 'Dhanmondi', purchasePrice: 70000, purchaseDate: '2024-03-01', currentRent: 0, totalEarnings: 0,
    assignmentHistory: []
  },
  {
    id: 'EV009', model: 'TVS iQube', brand: 'TVS', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-4444', status: 'rented', batteryLevel: 75, location: 'Banani', purchasePrice: 75000, purchaseDate: '2024-03-05', currentRent: 380, totalEarnings: 1140,
    assignmentHistory: [
      { id: 'ash9', bikeId: 'EV009', bikerId: 'u8', bikerName: 'Babul Akter', assignedAt: '2024-03-08 09:30:00', assignedBy: 'admin1', status: 'active' }
    ]
  },
  {
    id: 'EV010', model: 'Yadea DT3', brand: 'Yadea', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-5555', status: 'available', batteryLevel: 90, location: 'Uttara', purchasePrice: 68000, purchaseDate: '2024-03-10', currentRent: 0, totalEarnings: 0,
    assignmentHistory: []
  },
];

export const rentals: Rental[] = [
  { id: 'r1', bikeId: 'EV001', investorId: 'inv1', userId: 'u1', bikerName: 'Karim Ahmed', type: 'single', status: 'active', startDate: '2024-03-01', deposit: 5000, dailyRate: 350, totalPaid: 10500 },
  { id: 'r2', bikeId: 'EV003', investorId: 'inv2', userId: 'u2', bikerName: 'Sofiq Rahman', type: 'rent-to-own', status: 'active', startDate: '2024-02-15', deposit: 8000, dailyRate: 450, totalPaid: 18000 },
  { id: 'r3', bikeId: 'EV002', investorId: 'inv1', userId: 'u1', bikerName: 'Karim Ahmed', type: 'single', status: 'completed', startDate: '2024-01-10', endDate: '2024-01-25', deposit: 5000, dailyRate: 350, totalPaid: 5250 },
];

export const rentalPayments: RentalPayment[] = [
  { id: 'rp1', rentalId: 'r1', bikeId: 'EV001', investorId: 'inv1', bikeModel: 'Etron ET50', plateNumber: 'Dhaka Metro Cha-1234', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-25', amount: 350, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'mobile' },
  { id: 'rp2', rentalId: 'r1', bikeId: 'EV001', investorId: 'inv1', bikeModel: 'Etron ET50', plateNumber: 'Dhaka Metro Cha-1234', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-24', amount: 350, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'mobile' },
  { id: 'rp3', rentalId: 'r1', bikeId: 'EV001', investorId: 'inv1', bikeModel: 'Etron ET50', plateNumber: 'Dhaka Metro Cha-1234', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-23', amount: 350, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'cash' },
  { id: 'rp4', rentalId: 'r1', bikeId: 'EV001', investorId: 'inv1', bikeModel: 'Etron ET50', plateNumber: 'Dhaka Metro Cha-1234', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-22', amount: 350, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'mobile' },
  { id: 'rp5', rentalId: 'r1', bikeId: 'EV001', investorId: 'inv1', bikeModel: 'Etron ET50', plateNumber: 'Dhaka Metro Cha-1234', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-21', amount: 350, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'mobile' },
  { id: 'rp6', rentalId: 'r2', bikeId: 'EV002', investorId: 'inv1', bikeModel: 'Yadea DT3', plateNumber: 'Dhaka Metro Cha-5678', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-25', amount: 300, duration: '1 day', planType: 'single', status: 'pending', paymentMethod: 'mobile' },
  { id: 'rp7', rentalId: 'r2', bikeId: 'EV002', investorId: 'inv1', bikeModel: 'Yadea DT3', plateNumber: 'Dhaka Metro Cha-5678', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-24', amount: 300, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'cash' },
  { id: 'rp8', rentalId: 'r2', bikeId: 'EV002', investorId: 'inv1', bikeModel: 'Yadea DT3', plateNumber: 'Dhaka Metro Cha-5678', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-23', amount: 300, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'mobile' },
  { id: 'rp9', rentalId: 'r3', bikeId: 'EV003', investorId: 'inv2', bikeModel: 'AIMA Lightning', plateNumber: 'Dhaka Metro Cha-9012', bikerId: 'u2', bikerName: 'Sofiq Rahman', date: '2024-03-25', amount: 450, duration: '1 day', planType: 'rent-to-own', status: 'paid', paymentMethod: 'bank' },
  { id: 'rp10', rentalId: 'r3', bikeId: 'EV003', investorId: 'inv2', bikeModel: 'AIMA Lightning', plateNumber: 'Dhaka Metro Cha-9012', bikerId: 'u2', bikerName: 'Sofiq Rahman', date: '2024-03-24', amount: 450, duration: '1 day', planType: 'rent-to-own', status: 'paid', paymentMethod: 'mobile' },
  { id: 'rp11', rentalId: 'r3', bikeId: 'EV003', investorId: 'inv2', bikeModel: 'AIMA Lightning', plateNumber: 'Dhaka Metro Cha-9012', bikerId: 'u2', bikerName: 'Sofiq Rahman', date: '2024-03-23', amount: 450, duration: '1 day', planType: 'rent-to-own', status: 'paid', paymentMethod: 'bank' },
  { id: 'rp12', rentalId: 'r1', bikeId: 'EV001', investorId: 'inv1', bikeModel: 'Etron ET50', plateNumber: 'Dhaka Metro Cha-1234', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-20', amount: 350, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'cash' },
  { id: 'rp13', rentalId: 'r1', bikeId: 'EV001', investorId: 'inv1', bikeModel: 'Etron ET50', plateNumber: 'Dhaka Metro Cha-1234', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-19', amount: 350, duration: '1 day', planType: 'single', status: 'paid', paymentMethod: 'mobile' },
  { id: 'rp14', rentalId: 'r2', bikeId: 'EV002', investorId: 'inv1', bikeModel: 'Yadea DT3', plateNumber: 'Dhaka Metro Cha-5678', bikerId: 'u1', bikerName: 'Karim Ahmed', date: '2024-03-22', amount: 300, duration: '1 day', planType: 'single', status: 'failed', paymentMethod: 'mobile' },
];

export const transactions: Transaction[] = [
  // Biker transactions
  { id: 't1', userId: 'u1', type: 'rental_payment', amount: 350, status: 'completed', description: 'Daily Rental - Mar 21', createdAt: '2024-03-21' },
  { id: 't2', userId: 'u1', type: 'rental_payment', amount: 350, status: 'completed', description: 'Daily Rental - Mar 20', createdAt: '2024-03-20' },
  { id: 't3', userId: 'u1', type: 'deposit', amount: 5000, status: 'completed', description: 'Security Deposit Paid', createdAt: '2024-03-01' },
  { id: 't4', userId: 'u1', type: 'topup', amount: 2000, status: 'completed', description: 'Wallet Top Up', createdAt: '2024-03-15' },

  // Investor 1 (inv1) - Hasan Mahmud - Multiple investment transactions
  { id: 'invt1', investorId: 'inv1', type: 'investment', amount: 85000, status: 'completed', description: 'Investment - Etron ET50 (Gold Plan)', paymentMethod: 'bank', referenceNumber: 'INV/2024/001', createdAt: '2024-01-15', processedAt: '2024-01-15' },
  { id: 'invt2', investorId: 'inv1', type: 'investment', amount: 65000, status: 'completed', description: 'Investment - Yadea DT3 (Gold Plan)', paymentMethod: 'mobile', referenceNumber: 'INV/2024/002', createdAt: '2024-01-20', processedAt: '2024-01-20' },
  { id: 'invt3', investorId: 'inv1', type: 'bike_earning', bikeId: 'b1', amount: 2500, status: 'completed', description: 'Monthly Earnings - Bike b1 (Etron ET50)', createdAt: '2024-02-15', processedAt: '2024-02-15' },
  { id: 'invt4', investorId: 'inv1', type: 'bike_earning', bikeId: 'b2', amount: 2125, status: 'completed', description: 'Monthly Earnings - Bike b2 (Yadea DT3)', createdAt: '2024-02-15', processedAt: '2024-02-15' },
  { id: 'invt5', investorId: 'inv1', type: 'bike_earning', bikeId: 'b1', amount: 2500, status: 'completed', description: 'Monthly Earnings - Bike b1 (Etron ET50)', createdAt: '2024-03-15', processedAt: '2024-03-15' },
  { id: 'invt6', investorId: 'inv1', type: 'bike_earning', bikeId: 'b2', amount: 2125, status: 'completed', description: 'Monthly Earnings - Bike b2 (Yadea DT3)', createdAt: '2024-03-15', processedAt: '2024-03-15' },
  { id: 'invt7', investorId: 'inv1', type: 'withdrawal', amount: 15000, status: 'completed', description: 'Withdrawal via Bank Transfer', paymentMethod: 'bank', referenceNumber: 'WDL/2024/015', createdAt: '2024-02-20', processedAt: '2024-02-21' },
  { id: 'invt8', investorId: 'inv1', type: 'withdrawal', amount: 10000, status: 'completed', description: 'Withdrawal via Bkash', paymentMethod: 'mobile', referenceNumber: 'WDL/2024/022', createdAt: '2024-03-10', processedAt: '2024-03-10' },
  { id: 'invt9', investorId: 'inv1', type: 'withdrawal', amount: 20000, status: 'completed', description: 'Withdrawal via Bank Transfer', paymentMethod: 'bank', referenceNumber: 'WDL/2024/028', createdAt: '2024-03-18', processedAt: '2024-03-19' },
  { id: 'invt10', investorId: 'inv1', type: 'withdrawal', amount: 3000, status: 'pending', description: 'Withdrawal Request - Bkash', paymentMethod: 'mobile', referenceNumber: 'WDL/2024/035', createdAt: '2024-03-20' },
  { id: 'invt11', investorId: 'inv1', type: 'referral_bonus', amount: 1500, status: 'completed', description: 'Referral Bonus - New Investor Signup', createdAt: '2024-02-01', processedAt: '2024-02-01' },
  { id: 'invt12', investorId: 'inv1', type: 'referral_bonus', amount: 1000, status: 'completed', description: 'Referral Bonus - New Investor Signup', createdAt: '2024-03-05', processedAt: '2024-03-05' },

  // Investor 2 (inv2) - Ahmed Khan - Platinum Plan
  { id: 'invt13', investorId: 'inv2', type: 'investment', amount: 95000, status: 'completed', description: 'Investment - AIMA Lightning (Platinum Plan)', paymentMethod: 'bank', referenceNumber: 'INV/2023/089', createdAt: '2023-11-05', processedAt: '2023-11-05' },
  { id: 'invt14', investorId: 'inv2', type: 'investment', amount: 72000, status: 'completed', description: 'Investment - TVS iQube (Platinum Plan)', paymentMethod: 'bank', referenceNumber: 'INV/2023/095', createdAt: '2023-12-01', processedAt: '2023-12-01' },
  { id: 'invt15', investorId: 'inv2', type: 'investment', amount: 68000, status: 'completed', description: 'Investment - Bajaj Chetak (Platinum Plan)', paymentMethod: 'mobile', referenceNumber: 'INV/2023/102', createdAt: '2023-11-10', processedAt: '2023-11-10' },
  { id: 'invt16', investorId: 'inv2', type: 'investment', amount: 55000, status: 'completed', description: 'Investment - Hero Photon (Platinum Plan)', paymentMethod: 'bank', referenceNumber: 'INV/2024/008', createdAt: '2024-02-01', processedAt: '2024-02-01' },
  { id: 'invt17', investorId: 'inv2', type: 'bike_earning', bikeId: 'b3', amount: 3750, status: 'completed', description: 'Monthly Earnings - Bike b3 (AIMA Lightning)', createdAt: '2023-12-15', processedAt: '2023-12-15' },
  { id: 'invt18', investorId: 'inv2', type: 'bike_earning', bikeId: 'b4', amount: 1415, status: 'completed', description: 'Monthly Earnings - Bike b4 (TVS iQube)', createdAt: '2023-12-15', processedAt: '2023-12-15' },
  { id: 'invt19', investorId: 'inv2', type: 'bike_earning', bikeId: 'b5', amount: 3335, status: 'completed', description: 'Monthly Earnings - Bike b5 (Bajaj Chetak)', createdAt: '2023-12-15', processedAt: '2023-12-15' },
  { id: 'invt20', investorId: 'inv2', type: 'bike_earning', bikeId: 'b3', amount: 3750, status: 'completed', description: 'Monthly Earnings - Bike b3 (AIMA Lightning)', createdAt: '2024-01-15', processedAt: '2024-01-15' },
  { id: 'invt21', investorId: 'inv2', type: 'bike_earning', bikeId: 'b4', amount: 1415, status: 'completed', description: 'Monthly Earnings - Bike b4 (TVS iQube)', createdAt: '2024-01-15', processedAt: '2024-01-15' },
  { id: 'invt22', investorId: 'inv2', type: 'bike_earning', bikeId: 'b5', amount: 3335, status: 'completed', description: 'Monthly Earnings - Bike b5 (Bajaj Chetak)', createdAt: '2024-01-15', processedAt: '2024-01-15' },
  { id: 'invt23', investorId: 'inv2', type: 'bike_earning', bikeId: 'b6', amount: 750, status: 'completed', description: 'Monthly Earnings - Bike b6 (Hero Photon)', createdAt: '2024-03-15', processedAt: '2024-03-15' },
  { id: 'invt24', investorId: 'inv2', type: 'bike_earning', bikeId: 'b3', amount: 3750, status: 'completed', description: 'Monthly Earnings - Bike b3 (AIMA Lightning)', createdAt: '2024-02-15', processedAt: '2024-02-15' },
  { id: 'invt25', investorId: 'inv2', type: 'bike_earning', bikeId: 'b4', amount: 1415, status: 'completed', description: 'Monthly Earnings - Bike b4 (TVS iQube)', createdAt: '2024-02-15', processedAt: '2024-02-15' },
  { id: 'invt26', investorId: 'inv2', type: 'bike_earning', bikeId: 'b5', amount: 3335, status: 'completed', description: 'Monthly Earnings - Bike b5 (Bajaj Chetak)', createdAt: '2024-02-15', processedAt: '2024-02-15' },
  { id: 'invt27', investorId: 'inv2', type: 'bike_earning', bikeId: 'b3', amount: 3750, status: 'completed', description: 'Monthly Earnings - Bike b3 (AIMA Lightning)', createdAt: '2024-03-15', processedAt: '2024-03-15' },
  { id: 'invt28', investorId: 'inv2', type: 'bike_earning', bikeId: 'b4', amount: 1415, status: 'completed', description: 'Monthly Earnings - Bike b4 (TVS iQube)', createdAt: '2024-03-15', processedAt: '2024-03-15' },
  { id: 'invt29', investorId: 'inv2', type: 'bike_earning', bikeId: 'b5', amount: 3335, status: 'completed', description: 'Monthly Earnings - Bike b5 (Bajaj Chetak)', createdAt: '2024-03-15', processedAt: '2024-03-15' },
  { id: 'invt30', investorId: 'inv2', type: 'withdrawal', amount: 25000, status: 'completed', description: 'Withdrawal via Bank Transfer', paymentMethod: 'bank', referenceNumber: 'WDL/2024/010', createdAt: '2024-01-20', processedAt: '2024-01-21' },
  { id: 'invt31', investorId: 'inv2', type: 'withdrawal', amount: 25000, status: 'completed', description: 'Withdrawal via Bank Transfer', paymentMethod: 'bank', referenceNumber: 'WDL/2024/018', createdAt: '2024-02-15', processedAt: '2024-02-16' },
  { id: 'invt32', investorId: 'inv2', type: 'withdrawal', amount: 25000, status: 'completed', description: 'Withdrawal via Nagad', paymentMethod: 'mobile', referenceNumber: 'WDL/2024/025', createdAt: '2024-03-12', processedAt: '2024-03-12' },
  { id: 'invt33', investorId: 'inv2', type: 'referral_bonus', amount: 2500, status: 'completed', description: 'Referral Bonus - Investor Referral Program', createdAt: '2024-01-10', processedAt: '2024-01-10' },
  { id: 'invt34', investorId: 'inv2', type: 'referral_bonus', amount: 5000, status: 'completed', description: 'Referral Bonus - Multiple Referrals Bonus', createdAt: '2024-02-20', processedAt: '2024-02-20' },

  // Investor 3 (inv3) - Sadia Islam - Silver Plan
  { id: 'invt35', investorId: 'inv3', type: 'investment', amount: 75000, status: 'completed', description: 'Investment - Okinawa Praise (Silver Plan)', paymentMethod: 'bank', referenceNumber: 'INV/2024/012', createdAt: '2024-02-10', processedAt: '2024-02-10' },
  { id: 'invt36', investorId: 'inv3', type: 'bike_earning', bikeId: 'b7', amount: 1585, status: 'completed', description: 'Monthly Earnings - Bike b7 (Okinawa Praise)', createdAt: '2024-03-15', processedAt: '2024-03-15' },
  { id: 'invt37', investorId: 'inv3', type: 'investment_return', amount: 4500, status: 'completed', description: 'Investment Return - Q1 2024', paymentMethod: 'bank', referenceNumber: 'RET/2024/Q1/001', createdAt: '2024-03-31', processedAt: '2024-03-31' },
  { id: 'invt38', investorId: 'inv3', type: 'withdrawal', amount: 5000, status: 'pending', description: 'Withdrawal Request - Bkash', paymentMethod: 'mobile', referenceNumber: 'WDL/2024/032', createdAt: '2024-03-19' },
  { id: 'invt39', investorId: 'inv3', type: 'withdrawal', amount: 15000, status: 'completed', description: 'Withdrawal via Bank Transfer', paymentMethod: 'bank', referenceNumber: 'WDL/2024/008', createdAt: '2024-03-05', processedAt: '2024-03-06' },

  // Adjustment transactions
  { id: 'adj1', investorId: 'inv1', type: 'adjustment', amount: -500, status: 'completed', description: 'Bike Maintenance Deduction', createdAt: '2024-02-10', processedAt: '2024-02-10' },
  { id: 'adj2', investorId: 'inv2', type: 'adjustment', amount: -300, status: 'completed', description: 'Service Charge Deduction', createdAt: '2024-01-20', processedAt: '2024-01-20' },
  { id: 'adj3', investorId: 'inv2', type: 'penalty', amount: -1000, status: 'completed', description: 'Late Payment Penalty', createdAt: '2024-02-25', processedAt: '2024-02-25' },
];

export const investors: Investor[] = [
  {
    id: 'inv1',
    userId: 'u7',
    name: 'Md. Hasan Mahmud',
    email: 'hasan.mahmud@email.com',
    phone: '01712345678',
    phoneAlt: '01812345678',
    address: 'House 12, Road 5, Dhanmondi, Dhaka 1205',
    dateOfBirth: '1985-03-15',
    gender: 'male',
    occupation: 'Business',
    nidNumber: '1234567890',
    tinNumber: '9876543210',
    bankName: 'Islami Bank Bangladesh Ltd',
    bankAccountName: 'Hasan Mahmud',
    bankAccountNumber: '205015002345',
    bankBranch: 'Dhanmondi Branch',
    bankRouting: '140',
    bankAccounts: [
      { id: 'ba1', bankName: 'Islami Bank Bangladesh Ltd', accountName: 'Hasan Mahmud', accountNumber: '205015002345', branch: 'Dhanmondi Branch', routing: '140', isPrimary: true },
      { id: 'ba2', bankName: 'Dutch-Bangla Bank', accountName: 'Hasan Mahmud', accountNumber: '1203456789012', branch: 'Gulshan Branch', routing: '090', isPrimary: false },
    ],
    mobileBanking: 'bKash',
    mobileBankingNumber: '01712345678',
    additionalMobileBanking: [
      { provider: 'Nagad', number: '01712345679', verified: true }
    ],
    emergencyContactName: 'Fatema Begum',
    emergencyContactRelation: 'Wife',
    emergencyContactPhone: '01712345679',
    totalInvested: 300000,
    totalEarnings: 114250,
    activeBikes: 2,
    withdrawalPending: 3000,
    totalWithdrawn: 45000,
    pendingEarnings: 4625,
    roi: 19,
    status: 'active',
    notes: 'Long-term investor, reliable payment history',
    createdAt: '2024-01-15',
    updatedAt: '2024-03-20',
    kycStatus: 'verified',
    kycSubmittedAt: '2024-01-10',
    kycDocuments: [
      { type: 'nid', number: '1234567890', verified: true, uploadedAt: '2024-01-10' },
      { type: 'bank_statement', verified: true, uploadedAt: '2024-01-10' }
    ],
    riskLevel: 'low',
    referralCode: 'INV2024H1',
    referredBy: undefined,
    totalReferrals: 2,
    referralEarnings: 2500,
    investments: [
      { id: 'ip1', investorId: 'inv1', planName: 'Gold EV Fleet 2024', planType: 'gold', bikeIds: ['b1'], totalInvestment: 85000, monthlyReturn: 2500, expectedRoi: 18, actualEarnings: 10000, startDate: '2024-01-15', endDate: '2025-01-14', status: 'active', paymentMethod: 'bank', transactionId: 'invt1', createdAt: '2024-01-15' },
      { id: 'ip2', investorId: 'inv1', planName: 'Gold City Commuter', planType: 'gold', bikeIds: ['b2'], totalInvestment: 65000, monthlyReturn: 2125, expectedRoi: 18, actualEarnings: 4250, startDate: '2024-01-20', endDate: '2025-01-19', status: 'active', paymentMethod: 'mobile', transactionId: 'invt2', createdAt: '2024-01-20' },
      { id: 'ip3', investorId: 'inv1', planName: 'Standard Battery Plan', planType: 'silver', assetType: 'battery', batteryIds: ['BAT-001', 'BAT-002'], totalInvestment: 150000, monthlyReturn: 4500, expectedRoi: 16, actualEarnings: 9000, startDate: '2024-02-01', endDate: '2025-02-01', status: 'active', paymentMethod: 'bank', transactionId: 'invt3', createdAt: '2024-02-01' }
    ]
  },
  {
    id: 'inv2',
    userId: 'u8',
    name: 'Ahmed Khan',
    email: 'ahmed.khan@email.com',
    phone: '01722345678',
    phoneAlt: '01922345678',
    address: 'Flat 3B, House 45, Gulshan Avenue, Dhaka 1212',
    dateOfBirth: '1978-07-22',
    gender: 'male',
    occupation: 'Real Estate',
    nidNumber: '2345678901',
    bankName: 'Standard Chartered Bank',
    bankAccountName: 'Ahmed Khan',
    bankAccountNumber: '2150 5678 9012',
    bankBranch: 'Gulshan Branch',
    bankRouting: '270',
    mobileBanking: 'Nagad',
    mobileBankingNumber: '01722345678',
    additionalMobileBanking: [
      { provider: 'Bkash', number: '01722345679', verified: true },
      { provider: 'Rocket', number: '01722345680', verified: false }
    ],
    emergencyContactName: 'Rahima Khan',
    emergencyContactRelation: 'Wife',
    emergencyContactPhone: '01722345679',
    totalInvested: 290000,
    totalEarnings: 36250,
    activeBikes: 4,
    withdrawalPending: 0,
    totalWithdrawn: 75000,
    pendingEarnings: 10840,
    roi: 17,
    status: 'active',
    notes: 'Premium investor with multiple bike investments',
    createdAt: '2023-11-01',
    updatedAt: '2024-03-18',
    kycStatus: 'verified',
    kycSubmittedAt: '2023-10-25',
    kycDocuments: [
      { type: 'nid', number: '2345678901', verified: true, uploadedAt: '2023-10-25' },
      { type: 'bank_statement', verified: true, uploadedAt: '2023-10-25' },
      { type: 'tin_certificate', number: '234567890', verified: true, uploadedAt: '2023-10-25' }
    ],
    riskLevel: 'low',
    referralCode: 'INV2024A2',
    totalReferrals: 5,
    referralEarnings: 7500,
    investments: [
      { id: 'ip3', investorId: 'inv2', planName: 'Platinum Premium Fleet', planType: 'platinum', bikeIds: ['b3'], totalInvestment: 95000, monthlyReturn: 3750, expectedRoi: 20, actualEarnings: 15000, startDate: '2023-11-05', endDate: '2024-11-04', status: 'active', paymentMethod: 'bank', transactionId: 'invt13', createdAt: '2023-11-05' },
      { id: 'ip4', investorId: 'inv2', planName: 'Platinum Urban Ride', planType: 'platinum', bikeIds: ['b4'], totalInvestment: 72000, monthlyReturn: 1415, expectedRoi: 18, actualEarnings: 5660, startDate: '2023-12-01', endDate: '2024-11-30', status: 'active', paymentMethod: 'bank', transactionId: 'invt14', createdAt: '2023-12-01' },
      { id: 'ip5', investorId: 'inv2', planName: 'Platinum City Electric', planType: 'platinum', bikeIds: ['b5'], totalInvestment: 68000, monthlyReturn: 3335, expectedRoi: 20, actualEarnings: 13340, startDate: '2023-11-10', endDate: '2024-11-09', status: 'active', paymentMethod: 'mobile', transactionId: 'invt15', createdAt: '2023-11-10' },
      { id: 'ip6', investorId: 'inv2', planName: 'Platinum New Entry', planType: 'platinum', bikeIds: ['b6'], totalInvestment: 55000, monthlyReturn: 750, expectedRoi: 16, actualEarnings: 750, startDate: '2024-02-01', endDate: '2025-01-31', status: 'active', paymentMethod: 'bank', transactionId: 'invt16', createdAt: '2024-02-01' }
    ]
  },
  {
    id: 'inv3',
    userId: 'u9',
    name: 'Sadia Islam',
    email: 'sadia.islam@email.com',
    phone: '01732345678',
    phoneAlt: '01632345678',
    address: 'Road 8, House 22, Baridhara, Dhaka 1212',
    dateOfBirth: '1990-12-05',
    gender: 'female',
    occupation: 'Engineer',
    nidNumber: '3456789012',
    bankName: 'BRAC Bank',
    bankAccountName: 'Sadia Islam',
    bankAccountNumber: '1510 8901 2345',
    bankBranch: 'Baridhara Branch',
    bankRouting: '180',
    mobileBanking: 'Rocket',
    mobileBankingNumber: '01732345678',
    additionalMobileBanking: [],
    emergencyContactName: 'Abul Hasan',
    emergencyContactRelation: 'Brother',
    emergencyContactPhone: '01732345679',
    totalInvested: 75000,
    totalEarnings: 6085,
    activeBikes: 1,
    withdrawalPending: 5000,
    totalWithdrawn: 15000,
    pendingEarnings: 1585,
    roi: 12,
    status: 'pending',
    notes: 'New investor, first investment',
    createdAt: '2024-02-01',
    updatedAt: '2024-03-15',
    kycStatus: 'pending',
    kycSubmittedAt: '2024-02-01',
    kycDocuments: [
      { type: 'nid', number: '3456789012', verified: false, uploadedAt: '2024-02-01' }
    ],
    riskLevel: 'medium',
    referralCode: 'INV2024S3',
    totalReferrals: 0,
    referralEarnings: 0,
    investments: [
      { id: 'ip7', investorId: 'inv3', planName: 'Silver Starter Pack', planType: 'silver', bikeIds: ['b7'], totalInvestment: 75000, monthlyReturn: 1585, expectedRoi: 12, actualEarnings: 6085, startDate: '2024-02-10', status: 'active', paymentMethod: 'bank', transactionId: 'invt35', createdAt: '2024-02-10' }
    ]
  },
];

export const kycRequests: KYCRequest[] = [
  { id: 'kyc1', userId: 'u10', userName: 'New Biker Rahim', phone: '01712345670', submittedAt: '2024-03-20', status: 'pending' },
  { id: 'kyc2', userId: 'u11', userName: 'New Biker Karim', phone: '01712345671', submittedAt: '2024-03-19', status: 'pending' },
  { id: 'kyc3', userId: 'u12', userName: 'New Biker Jamal', phone: '01712345672', submittedAt: '2024-03-18', status: 'approved' },
];

export const deliveries: Delivery[] = [
  { id: 'd1', shopId: 'u8', riderId: 'u1', status: 'in_progress', pickupLocation: 'Gulshan 1', dropoffLocation: 'Banani 11', createdAt: '2024-03-21' },
  { id: 'd2', shopId: 'u8', riderId: 'u2', status: 'pending', pickupLocation: 'Gulshan 2', dropoffLocation: 'Uttara', createdAt: '2024-03-21' },
  { id: 'd3', shopId: 'u8', riderId: 'u1', status: 'completed', pickupLocation: 'Dhanmondi', dropoffLocation: 'Mirpur 1', createdAt: '2024-03-20' },
];

export const stats = {
  biker: {
    activeRental: 1,
    walletBalance: 1250,
    totalRides: 45,
    daysRemaining: 14,
  },
  admin: {
    totalBikers: 156,
    activeRentals: 89,
    dailyRevenue: 45600,
    monthlyRevenue: 1250000,
    fleetUtilization: 78,
  },
  investor: {
    totalInvested: 150000,
    totalEarnings: 28500,
    activeBikes: 2,
  },
  shop: {
    todayDeliveries: 23,
    activeRiders: 8,
    completedToday: 19,
  },
};

export const availableBikes: Bike[] = [
  { id: 'b2', model: 'Yadea DT3', brand: 'Yadea', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-5678', status: 'available', batteryLevel: 95, location: 'Banani' },
  { id: 'b5', model: 'Bajaj Chetak', brand: 'Bajaj', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-7890', status: 'available', batteryLevel: 100, location: 'Dhanmondi' },
  { id: 'b6', model: 'Hero Photon', brand: 'Hero', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-1111', status: 'available', batteryLevel: 88, location: 'Mirpur' },
  { id: 'b7', model: 'Okinawa Praise', brand: 'Okinawa', image: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400', plateNumber: 'Dhaka Metro Cha-2222', status: 'available', batteryLevel: 92, location: 'Gulshan 2' },
];