#pragma once
#include <QWidget>
#include <QTableWidget>
#include <QVBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <QIntValidator>
#include <QComboBox>
#include "Subject.h"
#include "Service.h"

class Admin_view : public QWidget , virtual public Observer
{
    
    private:
        Service& _subject;
        QComboBox* _combo;
        QTableWidget* _table;
        QLineEdit* _name;
        QLineEdit* _category;
        QLineEdit* _price;
        QPushButton* _add_button;
        QIntValidator* _validator;
        QTableWidget* _table_item;

        User& _user;



    public:
        Admin_view(Service& subject, User& user, QWidget* parent = nullptr);
        void update() override;
        void populate_table();
        void populate_table_item();
};