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

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

// Employee
import { EmployeeList, EmployeeCreate, EmployeeEdit, EmployeeShow } from './resources/employee';

// Part
import { PartList, PartCreate, PartEdit, PartShow } from './resources/part';

// CategoryResource
import { CategoryResourceList, CategoryResourceCreate, CategoryResourceEdit, CategoryResourceShow } from './resources/category-resource';

// RepairOrder
import { RepairOrderList, RepairOrderCreate, RepairOrderEdit, RepairOrderShow } from './resources/repair-order';

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

// ConfirmationDocument
import { ConfirmationDocumentList, ConfirmationDocumentCreate, ConfirmationDocumentEdit, ConfirmationDocumentShow } from './resources/confirmation-document';

// ConsumptionRegistration
import { ConsumptionRegistrationList, ConsumptionRegistrationCreate, ConsumptionRegistrationEdit, ConsumptionRegistrationShow } from './resources/consumption-registration';

const App = () => (
  <Admin dataProvider={dataProvider} authProvider={authProvider}>
    <Resource 
      name="equipment" 
      list={EquipmentList} 
      create={EquipmentCreate} 
      edit={EquipmentEdit} 
      show={EquipmentShow} 
    />
    <Resource 
      name="employee" 
      list={EmployeeList} 
      create={EmployeeCreate} 
      edit={EmployeeEdit} 
      show={EmployeeShow} 
    />
    <Resource 
      name="part" 
      list={PartList} 
      create={PartCreate} 
      edit={PartEdit} 
      show={PartShow} 
    />
    <Resource 
      name="category-resource" 
      list={CategoryResourceList} 
      create={CategoryResourceCreate} 
      edit={CategoryResourceEdit} 
      show={CategoryResourceShow} 
    />
    <Resource 
      name="repair-order" 
      list={RepairOrderList} 
      create={RepairOrderCreate} 
      edit={RepairOrderEdit} 
      show={RepairOrderShow} 
    />
    <Resource 
      name="change-equipment-status" 
      list={ChangeEquipmentStatusList} 
      create={ChangeEquipmentStatusCreate} 
      edit={ChangeEquipmentStatusEdit} 
      show={ChangeEquipmentStatusShow} 
    />
    <Resource 
      name="confirmation-document" 
      list={ConfirmationDocumentList} 
      create={ConfirmationDocumentCreate} 
      edit={ConfirmationDocumentEdit} 
      show={ConfirmationDocumentShow} 
    />
    <Resource 
      name="consumption-registration" 
      list={ConsumptionRegistrationList} 
      create={ConsumptionRegistrationCreate} 
      edit={ConsumptionRegistrationEdit} 
      show={ConsumptionRegistrationShow} 
    />
  </Admin>
);

export default App;