#pragma once

#include "app_core/brush_package_export.h"
#include "foundation/result.h"

#include <string_view>

class App;
class NodeDialogExportPPBR;

namespace pp::panopainter {

enum class LegacyBrushPackageExportMode {
    inline_export_only,
    desktop_async_close_and_message,
};

[[nodiscard]] pp::app::BrushPackageExportRequest make_legacy_brush_package_export_request(
    const NodeDialogExportPPBR& dialog);

[[nodiscard]] pp::foundation::Status execute_legacy_brush_package_export(
    App& app,
    NodeDialogExportPPBR& dialog,
    const pp::app::BrushPackageExportRequest& request,
    std::string_view path,
    LegacyBrushPackageExportMode mode);

void complete_legacy_brush_package_export(NodeDialogExportPPBR& dialog, bool saved);

} // namespace pp::panopainter
