@if (Model.IsModified)
{
    <div class="folder-modified">
        M
    </div>
}

@code {

    [Parameter, EditorRequired]
    public IHierachyItemModel Model { get; set; } = default!;


    protected override void OnAfterRender(bool firstRender)
    {
        base.OnAfterRender(firstRender);
        if (firstRender)
        {
            Model.OnModified += StateHasChanged;
        }
    }

    public void Dispose()
    {
        Model.OnModified -= StateHasChanged;
        GC.SuppressFinalize(this);
    }
}
