@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>

@functions {
	private string GetTableReset()
	{
		return "border:0;margin:0;outline:0;padding:0;";
	}
}

@{
	string backgroundColor = $"background-color:{Model.ColorScheme?.BackgroundColor?.Hex ?? string.Empty};";
	string foregroundColor = $"color:{Model.ColorScheme?.ForegroundColor?.Hex ?? string.Empty};";
	string padding = Model.Item.GetRawValueString("Padding", "0");
	string align = Model.Item.GetRawValueString("Align", "left");
}

<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace:0pt;mso-table-rspace:0pt;mso-line-height-rule:exactly;@GetTableReset()color:inherit;width:100%;@(backgroundColor)">
	<tbody>
		<tr style="@GetTableReset()">
			<td style="@GetTableReset()@(backgroundColor)@(foregroundColor)padding:@(padding)px">
				
				@Model.GetModuleOutput()
				
				<!--[if mso]><br/><![endif]-->
			</td>
		</tr>

	</tbody>
</table>
