import { Admin, Resource } from 'react-admin';
import { authProvider } from './authProvider';
import { dataProvider } from './dataProvider';
import { EquipmentList, EquipmentCreate, EquipmentEdit, EquipmentShow } from './resources/equipment';
import { ChangeEquipmentStatusList, ChangeEquipmentStatusCreate, ChangeEquipmentStatusEdit, ChangeEquipmentStatusShow } from './resources/change-equipment-status';

const App = () => (
  <Admin dataProvider={dataProvider} authProvider={authProvider}>
    <Resource 
      name="equipment" 
      list={EquipmentList} 
      create={EquipmentCreate} 
      edit={EquipmentEdit} 
      show={EquipmentShow} 
    />
    <Resource 
      name="change-equipment-status" 
      list={ChangeEquipmentStatusList} 
      create={ChangeEquipmentStatusCreate} 
      edit={ChangeEquipmentStatusEdit} 
      show={ChangeEquipmentStatusShow} 
    />
  </Admin>
);

export default App;