@namespace BootstrapBlazor.Components
@inherits BootstrapComponentBase

<ul @attributes="AdditionalAttributes" class="@ClassString">
    @foreach (var item in Items)
    {
        <li class="time-line-item">
            <div class="time-line-item-tail"></div>
            <div class="@item.ToNodeClassString()">
                @if (!string.IsNullOrEmpty(item.Icon))
                {
                    <i class="@item.ToIconClassString()"></i>
                }
            </div>
            <div class="timeline-item-wrapper">
                @if (item.Component == null)
                {
                    <div class="timeline-item-content">
                        @item.Content
                    </div>
                }
                else
                {
                    @item.Component.Render()
                }
                <div class="timeline-item-timestamp">
                    @if(item.DescriptionTemplate != null)
                    {
                        @item.DescriptionTemplate
                    }
                    else
                    {
                        @item.Description
                    }
                </div>
            </div>
        </li>
    }
</ul>
