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

const statusChoices = [
  { id: 'Active', name: 'В эксплуатации' },
  { id: 'Repair', name: 'В ремонте' },
  { id: 'Reserve', name: 'В резерве' },
  { id: 'WriteOff', name: 'Списано' },
];

export const ChangeEquipmentStatusCreate = () => (
  <Create>
    <SimpleForm>
      <ReferenceInput source="equipmentId" reference="equipment" label="Оборудование" required />
      <SelectInput 
        source="newStatus" 
        label="Новый статус" 
        choices={statusChoices}
        required
      />
      <TextInput source="number" label="Номер" fullWidth />
      <DateInput source="date" label="Дата изменения статуса" required />
      <TextInput source="responsible" label="Ответственный" fullWidth />
    </SimpleForm>
  </Create>
);