import { Admin, Resource } from 'react-admin';
import { dataProvider } from './dataProvider';
import { authProvider } from './authProvider';

// Equipment resources
import { EquipmentList } from './resources/equipment/EquipmentList';
import { EquipmentCreate } from './resources/equipment/EquipmentCreate';
import { EquipmentEdit } from './resources/equipment/EquipmentEdit';
import { EquipmentShow } from './resources/equipment/EquipmentShow';

// ChangeEquipmentStatus resources
import { ChangeEquipmentStatusList } from './resources/change-equipment-status/ChangeEquipmentStatusList';
import { ChangeEquipmentStatusCreate } from './resources/change-equipment-status/ChangeEquipmentStatusCreate';
import { ChangeEquipmentStatusEdit } from './resources/change-equipment-status/ChangeEquipmentStatusEdit';
import { ChangeEquipmentStatusShow } from './resources/change-equipment-status/ChangeEquipmentStatusShow';

export 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>
);