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

const mockTasks = Array.from({ length: 10 }, (_, i) => ({
  id: `task-${i + 1}`,
  patient_id: `patient-${i + 1}`,
  patient_name: `患者${i + 1}`,
  template_id: `tmpl-1`,
  template_name: '血压随访',
  status: i % 2 === 0 ? 'pending' : 'completed',
  due_date: '2026-05-15',
  created_at: '2026-04-01T10:00:00Z',
  updated_at: '2026-04-01T10:00:00Z',
  version: 1,
}));

createListPageTests({
  Component: FollowUpTaskList,
  apiPath: '/api/v1/health/follow-up-tasks',
  columns: ['患者', '状态'],
  firstRowTexts: ['患者1'],
  totalItems: 10,
  hasCreateButton: false,
  hasSearch: true,
  hasPagination: false,
  mockItems: mockTasks as Record<string, unknown>[],
});
