@model CartWise.Web.ViewModels.Product.ProductDetailsViewModel
@{
    ViewData["Title"] = Model.Name;
}

<h1>@Model.Name</h1>

@if (!string.IsNullOrEmpty(Model.BrandName))
{
    <p class="text-muted mb-1">@Model.BrandName</p>
}
@if (!string.IsNullOrEmpty(Model.ConceptName))
{
    <p class="text-muted mb-1">Concept: @Model.ConceptName</p>
}
@if (!string.IsNullOrEmpty(Model.PackageDisplay))
{
    <p class="text-muted mb-1">Size: @Model.PackageDisplay</p>
}

@if (Model.BarcodeIdentifiers.Count > 0)
{
    <h2 class="h5 mt-4">Identifiers</h2>
    <ul>
        @foreach (var identifier in Model.BarcodeIdentifiers)
        {
            <li>@identifier</li>
        }
    </ul>
}

<form asp-controller="ShoppingList" asp-action="AddItem" method="post" class="mt-4">
    <input type="hidden" name="NewItem.DisplayName" value="@Model.Name" />
    <button type="submit" class="btn btn-primary">Add to my list</button>
</form>

<p class="text-muted mt-4"><em>Price history and recording a purchase will appear here once purchase tracking is available.</em></p>
