#ifndef ADDDESIGNATORDIALOG_H
#define ADDDESIGNATORDIALOG_H

#include <QDialog>
#include <QLineEdit>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGroupBox>
#include <QRegularExpressionValidator>
#include "../model/designatormappingmodel.h"

class AddDesignatorDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AddDesignatorDialog(QWidget *parent = nullptr);
    
    QString getDesignator() const;
    QString getSingularName() const;
    QString getPluralName() const;
    DesignatorMappingItem getMapping() const;

private slots:
    void onDesignatorChanged();
    void validateInputs();

private:
    void setUp();
    void setUpLayout();
    void setUpConnections();
    
    QLineEdit *m_designatorEdit;
    QLineEdit *m_singularNameEdit;
    QLineEdit *m_pluralNameEdit;
    QPushButton *m_okButton;
    QPushButton *m_cancelButton;
    
    QRegularExpressionValidator *m_designatorValidator;
};

#endif // ADDDESIGNATORDIALOG_H 