// Copyright (c) Rodel. All rights reserved.
// <auto-generated />

using Markdig.Syntax;
using Microsoft.UI;
using Microsoft.UI.Xaml.Documents;
using Microsoft.UI.Xaml.Media;

namespace BiliCopilot.UI.Controls.Markdown.TextElements;

internal class MyThematicBreak : IAddChild
{
    private readonly ThematicBreakBlock _thematicBreakBlock;
    private Paragraph _paragraph;

    public TextElement TextElement => _paragraph;

    public MyThematicBreak(ThematicBreakBlock thematicBreakBlock)
    {
        _thematicBreakBlock = thematicBreakBlock;
        _paragraph = new Paragraph();

        var inlineUIContainer = new InlineUIContainer();
        var border = new Border
        {
            Width = 500,
            BorderThickness = new Thickness(1),
            Margin = new Thickness(0, 4, 0, 4),
            BorderBrush = new SolidColorBrush(Colors.Gray),
            Height = 1,
            HorizontalAlignment = HorizontalAlignment.Stretch,
        };
        inlineUIContainer.Child = border;
        _paragraph.Inlines.Add(inlineUIContainer);
    }

    public void AddChild(IAddChild child)
    {
    }
}
