import { createListPageTests } from '../../test/factories/listPageTests';
import OfflineEventList from './OfflineEventList';

const mockEvents = Array.from({ length: 4 }, (_, i) => ({
  id: `event-${i + 1}`,
  title: `线下活动${i + 1}`,
  event_date: '2026-05-20',
  location: '社区活动中心',
  status: 'upcoming',
  max_participants: 50,
  points_reward: 100,
  participant_count: i * 10,
  created_at: '2026-04-01T10:00:00Z',
  updated_at: '2026-04-01T10:00:00Z',
  version: 1,
}));

createListPageTests({
  Component: OfflineEventList,
  apiPath: '/api/v1/health/admin/offline-events',
  columns: ['活动名称', '活动日期', '状态'],
  firstRowTexts: ['线下活动1'],
  totalItems: 4,
  hasCreateButton: true,
  createButtonText: '新建活动',
  hasSearch: true,
  hasPagination: false,
  mockItems: mockEvents as Record<string, unknown>[],
});
