import React from 'react';
import { List, Datagrid, TextField, DateField, EditButton, SelectInput } from 'react-admin';

export const ReportList = () => (
    <List filters={[
        <SelectInput source="status" choices={[
            { id: 'pending', name: 'Pending' },
            { id: 'reviewed', name: 'Reviewed' },
            { id: 'dismissed', name: 'Dismissed' },
        ]} alwaysOn />,
    ]}>
        <Datagrid rowClick="edit">
            <TextField source="id" />
            <TextField source="target_type" />
            <TextField source="target_id" />
            <TextField source="reason" />
            <TextField source="status" />
            <DateField source="created_at" />
            <EditButton />
        </Datagrid>
    </List>
);