#pragma once

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

#include <memory>

class App;
class Layer;
class NodeDialogLayerRename;

namespace pp::panopainter {

[[nodiscard]] pp::foundation::Status execute_legacy_document_layer_rename_plan(
    App& app,
    const pp::app::DocumentLayerRenamePlan& plan,
    const std::shared_ptr<NodeDialogLayerRename>& dialog);
void open_legacy_document_layer_rename_dialog(App& app);
[[nodiscard]] pp::foundation::Status execute_legacy_document_layer_menu_plan(
    App& app,
    const pp::app::DocumentLayerMenuPlan& plan);
[[nodiscard]] pp::foundation::Status execute_legacy_document_layer_merge_plan(
    App& app,
    const pp::app::DocumentLayerMergePlan& plan);
[[nodiscard]] pp::foundation::Status execute_legacy_document_layer_operation_plan(
    App& app,
    const pp::app::DocumentLayerOperationPlan& plan,
    const std::shared_ptr<Layer>& pending_layer = nullptr);

} // namespace pp::panopainter
