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

const equipmentStatusChoices = [
  { id: 'Active', name: 'Active' },
  { id: 'Repair', name: 'Repair' },
  { id: 'Reserve', name: 'Reserve' },
  { id: 'WriteOff', name: 'WriteOff' },
];

export const EquipmentCreate = () => (
  <Create>
    <SimpleForm>
      <TextInput source="name" />
      <TextInput source="serialNumber" />
      <DateInput source="dateOfInspection" />
      <DateInput source="commissionedAt" />
      <SelectInput source="status" choices={equipmentStatusChoices} defaultValue="Active" />
    </SimpleForm>
  </Create>
);