#pragma once

#include "../DialogChain/layered-dialog.h"
#include <QString>

class QLabel;

class MessageDialog : public LayeredDialog {
    Q_OBJECT
public:
    enum Type {
        Error,
        Success,
        Info
    };

    explicit MessageDialog(Type type, const QString& title, const QString& message, QWidget* parent = nullptr);

    // Convenience static helper for error dialog: blocks until closed
    static void showError(const QString& title, const QString& message, QWidget* parent = nullptr);
    static void showInfo(const QString& title, const QString& message, QWidget* parent = nullptr);

protected:
    void showEvent(QShowEvent* event) override;

private:
    void setupUI(Type type, const QString& title, const QString& message);
};
