#pragma once
#include "repo.h"
#include "Subject.h"

class Service : public Subject{

    private:
        Repository& _repository;
    
    public:
        Service(Repository& repository);
        void add(std::string name, std::string category, int current_price);
        void bid(std::string name, int bid, int id, std::string date);
        std::vector<Item> get_items();
        Item& find_item(std::string name);
        void attach(Observer* observer) override;
        void detach(Observer* observer) override;
        void notify() override;


};