@using Zap.BI.Portal.Pages.Printing
@model ScorecardItemPrintModel
@helper DisplayIndents(int indents)
{
    for (int i = 0; i < indents; i++)
    {<span class="dxtlIndent_SC"></span>}
}
@helper DisplayImage(string imageSource)
{
    if (string.IsNullOrEmpty(imageSource))
    {
        <div class="RowImage"></div>
    }
    else
    {
        <img class="RowImage" src="@Html.Raw(imageSource)">
    }
}
@helper DisplayValue(ScorecardItemColumnPrintModel cell)
{    
    switch (cell.Name)
    {
        case "Name":
            <span class="RowTitleWrapper RowTitleText">@cell.Value</span>
            break;
        case "Trend":
        case "Status":
            <div class="RowImageWrapper">
                @DisplayImage(@cell.Value)
            </div>
            break;
        default:
            <span>@cell.Value</span>
            break;
    }
}
<td><span class="dxtlIndent_SC"></span></td>
@for (int index = 0; index < Model.Values.Count; index++)
{
    <td class="scorecard-cell @Html.Raw(Model.Values[index].Name) dxtl">
        <div>
        @if (index == 0)
        { 
            @DisplayIndents(Model.Indents)
        }
        @DisplayValue(Model.Values[index])
        </div>
    </td>
}