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

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

export const ChangeEquipmentStatusCreate = () => (
  <Create>
    <SimpleForm>
      <ReferenceInput source="equipmentId" reference="equipment">
        <SelectInput optionText="name" />
      </ReferenceInput>
      <SelectInput source="newStatus" choices={statusChoices} />
      <TextInput source="number" />
      <DateInput source="date" />
      <TextInput source="responsible" />
    </SimpleForm>
  </Create>
);