#ifndef FORMPAYMENT_H
#define FORMPAYMENT_H

#include <QWidget>

#include "BaseWidget.h"
#include "DataTypeDef.h"

namespace Ui {
class FormPayment;
}

class FormPayment : public BaseWidget
{
    Q_OBJECT

public:
    explicit FormPayment(BaseWidget *parent = nullptr);
    ~FormPayment();

    bool returnParent() override;

private:
    void initWidget();
    void initComboBox();
    void initCommandButton();

    void initConnect();

    void initCurrencyCode();
    void initCurrencySymbol();

    void connectAllValueChanged(QWidget *widget);

    void refreshConfig(const PAYMENT_INFO& info);

    PAYMENT_INFO getNewConfig();

private slots:
    void onValueChanged();

protected:
    void showEvent(QShowEvent* event) override;
    void hideEvent(QHideEvent* event) override;

private:
    Ui::FormPayment *ui;
    TCU_CFG     m_tcu_cfg;

    QStringList m_currency_code;
    QStringList m_currency_symbol;
};

#endif // FORMPAYMENT_H
