@using FastReport.Web.Blazor.Components.Internal.OutLineNode
@using FastReport.Utils

<div class="fr-webreport-outline">
    <div class="fr-webreport-outline-inner">
        <OutlineBase Top="true" xml="OutlineXml" PageChanged="PageChanged" />
    </div>
</div>

@code {
    [Parameter]
    public XmlItem OutlineXml { get; set; }

    [Parameter]
    public EventCallback<int> PageChanged { get; set; }

    protected override bool ShouldRender()
    {
        return false;
    }

#if DEBUG
    System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();

    protected override void OnAfterRender(bool firstRender)
    {
        base.OnAfterRender(firstRender);
        stopwatch.Stop();
        var elapsed = stopwatch.ElapsedMilliseconds;
        System.Diagnostics.Debug.Print("Outline: " + elapsed + " ms");
    }

    public Outline()
    {
        stopwatch.Start();
    }
#endif
}
