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

const mockTemplates = Array.from({ length: 5 }, (_, i) => ({
  id: `tmpl-${i + 1}`,
  name: `随访模板${i + 1}`,
  description: `描述${i + 1}`,
  category: 'chronic',
  follow_up_type: 'phone',
  field_count: 3,
  frequency_days: 30,
  status: 'active',
  created_at: '2026-04-01T10:00:00Z',
  updated_at: '2026-04-01T10:00:00Z',
  version: 1,
}));

createListPageTests({
  Component: FollowUpTemplateList,
  apiPath: '/api/v1/health/follow-up-templates',
  columns: ['模板名称', '状态'],
  firstRowTexts: ['随访模板1'],
  totalItems: 5,
  hasCreateButton: true,
  createButtonText: '新建模板',
  hasSearch: false,
  hasPagination: false,
  mockItems: mockTemplates as Record<string, unknown>[],
});
