@page "/ProductDetails/{Id:int}"
@inherits ProductDetailsBase

@if(Product == null && ErrorMessage == null)
{
    <DisplaySpinner/>
}
else if(ErrorMessage != null)
{
    <DisplayError ErrorMessage="@ErrorMessage"></DisplayError>
}
else 
{
    <h3 class="mb-5">Product Details</h3>
    <div class="row">
        <div class="col-md-6 mb-4">
            <img class="img-fluid" src="@Product.ImageURL" >
        </div>
        <div class="col-mb-6"> 
            <h3>@Product.Name</h3>
            <p class="mb-4"> @Product.Description</p>
            <p class="mb-4">
                <b>@Product.Price.ToString("C")&nbsp;(@Product.Quantity in stock)</b>
            </p>
        </div>
    </div>
}