import { Edit, SimpleForm, TextInput, DateInput, DateTimeInput, SelectInput } from 'react-admin';

const statusChoices = [
  { id: 'Active', name: 'Active' },
  { id: 'Inactive', name: 'Inactive' },
  { id: 'Repair', name: 'Repair' },
];

export const EquipmentEdit = () => (
  <Edit>
    <SimpleForm>
      <TextInput disabled source="id" />
      <TextInput source="name" />
      <TextInput source="serialNumber" />
      <DateInput source="dateOfInspection" />
      <DateTimeInput source="commissionedAt" />
      <SelectInput source="status" choices={statusChoices} />
    </SimpleForm>
  </Edit>
);
