#pragma once

#include "app_core/document_canvas.h"
#include "app_core/document_resize.h"
#include "foundation/result.h"

class App;
class Canvas;

namespace pp::panopainter {

[[nodiscard]] bool legacy_document_canvas_available(const App& app) noexcept;
[[nodiscard]] pp::foundation::Result<pp::app::DocumentCanvasSnapshotResult>
capture_legacy_canvas_document_snapshot(const Canvas& canvas);
[[nodiscard]] pp::foundation::Result<pp::app::DocumentCanvasSnapshotResult>
capture_legacy_canvas_document_snapshot(const App& app);
[[nodiscard]] pp::foundation::Result<pp::app::DocumentCanvasSnapshotResult>
capture_legacy_canvas_document_payload_snapshot(Canvas& canvas);
[[nodiscard]] pp::foundation::Result<pp::app::DocumentCanvasSnapshotResult>
capture_legacy_canvas_document_payload_snapshot(App& app);
[[nodiscard]] pp::foundation::Status execute_legacy_document_canvas_clear_plan(
    App& app,
    const pp::app::DocumentCanvasClearPlan& plan);
[[nodiscard]] pp::foundation::Status execute_legacy_document_resize_plan(
    App& app,
    const pp::app::DocumentResizePlan& plan);

} // namespace pp::panopainter
