#pragma once

#include "app_core/app_dialog.h"

#include <memory>
#include <string>

class App;
class NodeInputBox;
class NodeMessageBox;
class NodeProgressBar;

namespace pp::panopainter {

[[nodiscard]] std::unique_ptr<pp::app::AppDialogFactory> make_legacy_app_dialog_factory(App& app);

[[nodiscard]] std::shared_ptr<NodeProgressBar> create_legacy_app_progress_dialog(
    App& app,
    const pp::app::AppProgressDialogPlan& plan);

[[nodiscard]] std::shared_ptr<NodeProgressBar> show_legacy_app_progress_dialog(
    App& app,
    const std::string& title,
    int total);

[[nodiscard]] std::shared_ptr<NodeMessageBox> create_legacy_app_message_dialog(
    App& app,
    const pp::app::AppMessageDialogPlan& plan);

[[nodiscard]] std::shared_ptr<NodeMessageBox> show_legacy_app_message_dialog(
    App& app,
    const std::string& title,
    const std::string& text,
    bool cancel_button);

[[nodiscard]] std::shared_ptr<NodeInputBox> create_legacy_app_input_dialog(
    App& app,
    const pp::app::AppInputDialogPlan& plan);

[[nodiscard]] std::shared_ptr<NodeInputBox> show_legacy_app_input_dialog(
    App& app,
    const std::string& title,
    const std::string& field_name,
    const std::string& ok_caption);

[[nodiscard]] std::shared_ptr<NodeProgressBar> legacy_progress_dialog_node(
    const std::shared_ptr<pp::app::AppProgressDialog>& dialog) noexcept;

[[nodiscard]] std::shared_ptr<NodeMessageBox> legacy_message_dialog_node(
    const std::shared_ptr<pp::app::AppMessageDialog>& dialog) noexcept;

[[nodiscard]] std::shared_ptr<NodeInputBox> legacy_input_dialog_node(
    const std::shared_ptr<pp::app::AppInputDialog>& dialog) noexcept;

} // namespace pp::panopainter
