@namespace Connected.Components
@typeparam T
@typeparam ModelType
@inherits ColumnBase
@if (Visible)
{
    if (Mode == Rendermode.Header)
    {
        if (SortLabel != null)
        {
            <Th><TableSortLabel SortLabel="@SortLabel" T="ModelType">@HeaderText</TableSortLabel></Th>
        }
        else if (SortBy != null)
        {
            <Th><TableSortLabel SortBy="@SortBy">@HeaderText</TableSortLabel></Th>
        }
        else
        {
            <Th>@HeaderText</Th>
        }
    }
    else if (Mode == Rendermode.Item || (ReadOnly && Mode == Rendermode.Edit))
    {
        <Td DataLabel="@HeaderText">@GetFormattedString(Value)</Td>
    }
    else if (Mode == Rendermode.Edit)
    {
        <Td DataLabel="@HeaderText"><TextField @bind-Value="InternalValue" /></Td>
    }
    else if (Mode == Rendermode.Footer)
    {
        @if (_footerValueAvailable)
        {
            <Td>
                @GetFormattedString(FooterValue)
            </Td>
        }
        else
        {
            <Td>
                 @FooterText
            </Td>
        }
    }
}