@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
@using Dynamicweb.Ecommerce.ProductCatalog

@{
	ProductViewModel product = null;
	if (Dynamicweb.Context.Current.Items.Contains("ProductDetails"))
	{
		product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"];
	} else if (Pageview.IsVisualEditorMode) {
		product = new ProductViewModel();
		product.Number = "394041";
	}

	string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", "");
	horizontalAlign = horizontalAlign == "center" ? "text-center" : horizontalAlign;
	horizontalAlign = horizontalAlign == "end" ? "text-end" : horizontalAlign;
}

@if (product is object && !Model.Item.GetBoolean("HideProductNumber"))
{
	<div class="fs-7 opacity-85 @horizontalAlign item_@Model.Item.SystemName.ToLower()" itemprop="sku">@product.Number</div>
} 
