#include "repository/repository.h"
#include "controllers/admin_controller/admin_controller.h"
#include "ui/ui.h"

void fillRepo(AdminController* controller){
    controller->add(38,"Bej",55,30,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/71zZoa1e-xL._AC_UX466_.jpg");
    controller->add(40,"Bej",55,25,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/71zZoa1e-xL._AC_UX466_.jpg");
    controller->add(36,"Black",60,5,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/41RBzLubByL._AC_UY550_.jpg");
    controller->add(40,"Black",60,50,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/41RBzLubByL._AC_UY550_.jpg");
    controller->add(38,"Army Green",60,40,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/61Qptn0CKQL._AC_UX342_.jpg");
    controller->add(42,"Army Green",60,40,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/61Qptn0CKQL._AC_UX342_.jpg");
    controller->add(40,"Black",100,3,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/71YLqJCurtL._AC_UY550_.jpg");
    controller->add(38,"Red",33,20,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/816lGcU-fWL._AC_UX425_.jpg");
    controller->add(40,"Red",33,33,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/816lGcU-fWL._AC_UX425_.jpg");
    controller->add(38,"Blue",51,15,"https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T2/images/I/51zHT88C6zL._AC_UY550_.jpg");
}


int main(){

    Repository* repo = new Repository();
    Repository* shoppingRepo = new Repository();
    AdminController* controller = new AdminController(repo);
    fillRepo(controller);
    UserController* userController = new UserController(repo,shoppingRepo);
    UI* ui = new UI(controller,userController);
    ui->run();
    delete ui;
    return 0;
}