const makeTeacherSnapshot = (overrides) => ({
  id: overrides.id,
  name: overrides.name ?? `${overrides.firstName ?? ''} ${overrides.lastName ?? ''}`.trim(),
  email: overrides.email ?? '',
  phone: overrides.phone ?? null,
  roles: overrides.roles ?? ['teacher'],
  avatarUrl: overrides.avatarUrl ?? null,
  avatarDownloadUrl: overrides.avatarDownloadUrl ?? null,
  createdAt: overrides.createdAt ?? '',
  firstName: overrides.firstName ?? '',
  lastName: overrides.lastName ?? '',
  fullName: overrides.fullName ?? `${overrides.firstName ?? ''} ${overrides.lastName ?? ''}`.trim(),
})

export const adminCourses = [
  {
    id: 1,
    termId: null,
    teacherId: 5,
    title: 'اصول اخلاق اسلامی',
    description: 'دوره مقدماتی برای آشنایی با اخلاق اسلامی.',
    capacity: 30,
    isActive: true,
    coverUrl: 'https://picsum.photos/seed/course1/200/200',
    image: 'https://picsum.photos/seed/course1/200/200',
    teacher: makeTeacherSnapshot({ id: 5, firstName: 'علی', lastName: 'حسنی' }),
    term: null,
    sessionsCount: 0,
    prerequisitesCount: 0,
    prerequisites: [],
    startDate: '',
    endDate: '',
    createdAt: '2025-08-10T08:00:00.000Z',
  },
  {
    id: 2,
    termId: null,
    teacherId: 6,
    title: 'مفاهیم قرآنی',
    description: 'بررسی مفاهیم قرآنی به همراه تفسیر مختصر.',
    capacity: 25,
    isActive: true,
    coverUrl: 'https://picsum.photos/seed/course2/200/200',
    image: 'https://picsum.photos/seed/course2/200/200',
    teacher: makeTeacherSnapshot({ id: 6, firstName: 'حسین', lastName: 'مرادی' }),
    term: null,
    sessionsCount: 0,
    prerequisitesCount: 1,
    prerequisites: [{ courseId: 1, course: { id: 1, title: 'اصول اخلاق اسلامی' } }],
    startDate: '',
    endDate: '',
    createdAt: '2025-09-12T08:00:00.000Z',
  },
  {
    id: 3,
    termId: null,
    teacherId: 7,
    title: 'فقه عبادات',
    description: 'مرور احکام عملی نماز و روزه.',
    capacity: 20,
    isActive: false,
    coverUrl: '',
    image: '',
    teacher: makeTeacherSnapshot({ id: 7, firstName: 'مهدی', lastName: 'سهرابی' }),
    term: null,
    sessionsCount: 0,
    prerequisitesCount: 0,
    prerequisites: [],
    startDate: '',
    endDate: '',
    createdAt: '2026-01-05T08:00:00.000Z',
  },
  {
    id: 11,
    termId: 1,
    teacherId: 5,
    title: 'اصول اخلاق اسلامی - پاییز',
    description: 'دوره مقدماتی اخلاق اسلامی برای ترم پاییز.',
    capacity: 30,
    isActive: true,
    coverUrl: 'https://picsum.photos/seed/offered1/200/200',
    image: 'https://picsum.photos/seed/offered1/200/200',
    teacher: makeTeacherSnapshot({ id: 5, firstName: 'علی', lastName: 'حسنی' }),
    term: { id: 1, title: 'ترم پاییز ۱۴۰۴' },
    sessionsCount: 0,
    prerequisitesCount: 0,
    prerequisites: [],
    startDate: '2025-09-23T00:00:00.000Z',
    endDate: '2025-11-20T00:00:00.000Z',
    createdAt: '2025-09-01T08:00:00.000Z',
  },
  {
    id: 12,
    termId: 1,
    teacherId: 6,
    title: 'مفاهیم قرآنی - پاییز',
    description: 'مرور مفاهیم قرآنی به همراه تفسیر مختصر.',
    capacity: 25,
    isActive: true,
    coverUrl: 'https://picsum.photos/seed/offered2/200/200',
    image: 'https://picsum.photos/seed/offered2/200/200',
    teacher: makeTeacherSnapshot({ id: 6, firstName: 'حسین', lastName: 'مرادی' }),
    term: { id: 1, title: 'ترم پاییز ۱۴۰۴' },
    sessionsCount: 0,
    prerequisitesCount: 1,
    prerequisites: [{ courseId: 11, course: { id: 11, title: 'اصول اخلاق اسلامی - پاییز' } }],
    startDate: '2025-10-01T00:00:00.000Z',
    endDate: '2025-12-15T00:00:00.000Z',
    createdAt: '2025-09-10T08:00:00.000Z',
  },
  {
    id: 13,
    termId: 2,
    teacherId: 7,
    title: 'فقه عبادات - زمستان',
    description: 'مرور احکام عملی نماز و روزه برای ترم زمستان.',
    capacity: 20,
    isActive: false,
    coverUrl: '',
    image: '',
    teacher: makeTeacherSnapshot({ id: 7, firstName: 'مهدی', lastName: 'سهرابی' }),
    term: { id: 2, title: 'ترم زمستان ۱۴۰۴' },
    sessionsCount: 0,
    prerequisitesCount: 0,
    prerequisites: [],
    startDate: '2026-01-22T00:00:00.000Z',
    endDate: '2026-03-15T00:00:00.000Z',
    createdAt: '2025-12-10T08:00:00.000Z',
  },
]

export { makeTeacherSnapshot }
