@namespace Connected.Components
@typeparam T
@inherits ColumnBase

@if (Visible)
{
    @if (Mode == Rendermode.Header)
    {
        <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>
        }
    }
}
