@inherits DComponentBase @implements IDisposable @* One slide of a DCarousel. It registers with the carousel for its id and, with ShowNavigation, draws the previous/next links over itself. *@
@code { [CascadingParameter] DCarousel Parent { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } int Index => Parent?.IndexOf(this) ?? -1; string Id => Parent is null ? null : Parent.SlideId(Index); bool HasNavigation => Parent is { ShowNavigation: true, Count: > 1 }; protected override void OnInitialized() => Parent?.Add(this); public void Dispose() => Parent?.Remove(this); }