import { Create, NumberInput, SelectInput, SimpleForm } from "react-admin";
import { categoryPartChoices } from "../shared/enums";
import { PlainInput } from "../shared/inputs";

export const PartCreate = () => (
  <Create>
    <SimpleForm>
      <PlainInput source="name" required />
      <SelectInput source="categories" choices={categoryPartChoices} />
      <NumberInput source="price" />
      <PlainInput source="description" multiline />
      <PlainInput source="serialNumber" />
    </SimpleForm>
  </Create>
);
