#pragma once

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

#include <functional>

class App;
class NodeDialogCloud;

namespace pp::panopainter {

[[nodiscard]] pp::foundation::Status execute_legacy_cloud_upload_plan(
    App& app,
    const pp::app::CloudUploadPlan& plan);
[[nodiscard]] pp::foundation::Status execute_legacy_cloud_bulk_upload_plan(
    App& app,
    const pp::app::CloudBulkUploadPlan& plan);
[[nodiscard]] pp::foundation::Status execute_legacy_cloud_browse_action(
    App& app,
    pp::app::CloudBrowseAction action);
[[nodiscard]] pp::foundation::Status execute_legacy_cloud_download_selection_action(
    App& app,
    pp::app::CloudDownloadSelectionAction action,
    NodeDialogCloud& dialog);

void queue_legacy_cloud_worker_task(std::function<void()> task);

} // namespace pp::panopainter
