using Avalonia.Controls;
using Markdig.Syntax;
namespace MarkdownEditor.Views.Renderers;
///
/// Interface for rendering markdown blocks into Avalonia controls.
/// Allows for modular rendering of different markdown block types.
///
public interface IMarkdownBlockRenderer
{
///
/// Determines if this renderer can handle the given block type.
///
/// The markdown block to check.
/// True if this renderer can handle the block, false otherwise.
bool CanRender(Block block);
///
/// Renders the markdown block into an Avalonia control.
///
/// The markdown block to render.
/// The rendered Avalonia control, or null if rendering fails.
Control? Render(Block block);
}