#pragma once

#include <qstringlistmodel.h>
#include <QDialog>
#include <graph/server/spec.h>

namespace Ui {
class SpecDialog;
}

namespace Graph::GUI {
class SpecDialog : public QDialog {
  Q_OBJECT
 private:
  explicit SpecDialog(QWidget* parent = nullptr);

 public:
  SpecDialog(SpecDialog& other) = delete;
  void operator=(const SpecDialog&) = delete;
  ~SpecDialog();

  static SpecDialog* getInstance();
  static void close();
  chart_spec_t getSpec() const;

 private:
  static SpecDialog* instance;
  Ui::SpecDialog* ui;

  QStringListModel* series;
};
} // namespace Graph::GUI
