#ifndef COLUMNSETTINGSDIALOG_H
#define COLUMNSETTINGSDIALOG_H

#include <QDialog>
#include <QComboBox>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QLabel>
#include <QStringList>
#include <QGroupBox>

class MainController;

class ColumnSettingsDialog : public QDialog
{
    Q_OBJECT
public:
    explicit ColumnSettingsDialog(const QStringList &availableProperties, 
                                const QStringList &currentMappings,
                                QWidget *parent = nullptr);
    explicit ColumnSettingsDialog(MainController *controller, QWidget *parent = nullptr);
    
    QStringList getColumnMappings() const;
    
    // Методы для работы с настройками
    void saveSettings();
    void loadSettings();

private:
    void setUp();
    void setWidgets();
    void setUpLayout();
    void setUpConnections();
    
    QStringList m_availableProperties;
    QStringList m_currentMappings;
    MainController *m_controller;
    
    QList<QComboBox*> m_columnComboBoxes;
    QPushButton* m_okButton;
    QPushButton* m_cancelButton;
    QPushButton* m_resetButton;
    
    static const QStringList COLUMN_NAMES;
    static const QStringList DEFAULT_MAPPINGS;
};

#endif // COLUMNSETTINGSDIALOG_H 