// Mock data for development and testing
import { User, Contact } from '../types';

// Mock Users
export const mockUsers: User[] = [
  {
    id: 1,
    name: "Admiral Mohammad Ali",
    rank: "Admiral",
    service_no: "BN10001",
    unit: "Naval Headquarters",
    branch: "Operations",
    department: "Command",
    role: "Super_admin",
    designation: "CNS",
    phone: "+880211111111",
    mobile: "+8801811111111",
    email: "cns@navy.mil.bd",
    status: "online",
    lastSeen: new Date(),
    parent_id: null,
    contact_type: "internal",
    children: []
  },
  {
    id: 28,
    name: "Rear Admiral Mohammad Hasan",
    rank: "Rear Admiral",
    service_no: "BN20001",
    unit: "Dhaka Naval Area",
    branch: "Dhaka Naval Area",
    department: "Command",
    role: "Admin",
    designation: "Area Commander",
    phone: "+880222222222",
    mobile: "+8801812222222",
    email: "dhaka.commander@navy.mil.bd",
    status: "online",
    lastSeen: new Date(),
    parent_id: null,
    contact_type: "internal",
    children: []
  },
  {
    id: 29,
    name: "Captain Dr. Ayesha Khan",
    rank: "Captain",
    service_no: "BN20002",
    unit: "Dhaka Naval Area",
    branch: "Dhaka Naval Area",
    department: "Command",
    role: "Admin",
    designation: "Deputy Commander",
    phone: "+880222222223",
    mobile: "+8801812222223",
    email: "dhaka.deputy@navy.mil.bd",
    status: "online",
    lastSeen: new Date(),
    parent_id: null,
    contact_type: "internal",
    children: []
  },
  {
    id: 34,
    name: "Rear Admiral Rashid Khan",
    rank: "Rear Admiral",
    service_no: "BN40001",
    unit: "Khulna Naval Area",
    branch: "Khulna Naval Area",
    department: "Command",
    role: "Admin",
    designation: "Area Commander",
    phone: "+880244444444",
    mobile: "+8801814444444",
    email: "khulna.commander@navy.mil.bd",
    status: "online",
    lastSeen: new Date(),
    parent_id: null,
    contact_type: "internal",
    children: []
  },
  {
    id: 35,
    name: "Captain Sultana Khan",
    rank: "Captain",
    service_no: "BN40002",
    unit: "Khulna Naval Area",
    branch: "Khulna Naval Area",
    department: "Command",
    role: "Admin",
    designation: "Deputy Commander",
    phone: "+880244444445",
    mobile: "+8801814444445",
    email: "khulna.deputy@navy.mil.bd",
    status: "online",
    lastSeen: new Date(),
    parent_id: null,
    contact_type: "internal",
    children: []
  }
];

// Mock Contacts
export const mockContacts: Contact[] = mockUsers.map(user => ({
  id: user.id,
  name: user.name,
  rank_id: 1,
  rank_name: user.rank,
  service_no: user.service_no,
  unit_id: 1,
  unit_name: user.unit,
  branch_id: 1,
  branch_name: user.branch,
  sub_branch_id: null,
  sub_branch_name: null,
  department_id: 1,
  department_name: user.department || null,
  designation_id: 1,
  designation_name: user.designation,
  phone: user.phone,
  mobile: user.mobile || null,
  alternative_mobile: user.alternative_mobile || null,
  email: user.email,
  parent_id: user.parent_id || null,
  contact_type: user.contact_type || "internal",
  is_active: true,
  created_by: 1,
  created_by_name: "System",
  created_at: new Date().toISOString(),
  updated_at: new Date().toISOString(),
  role_id: user.role === "Super_admin" ? 1 : user.role === "Admin" ? 2 : 3,
  avatar: user.avatar || null,
  status: user.status,
  last_seen: user.lastSeen?.toISOString() || null,
  children: []
}));

export default { mockUsers, mockContacts };
