@model ProductDetailsModel
@if (Model.FreeShippingNotificationEnabled && Model.IsFreeShipping || !string.IsNullOrWhiteSpace(Model.DeliveryDate))
{
<div class="delivery">
    <script asp-location="Footer">
        $(document).on("product_attributes_changed", function (data) {
            if (data.changedData.isFreeShipping) {
                $("#free-shipping-" + data.changedData.productId).removeClass("invisible");
            } else {
                $("#free-shipping-" + data.changedData.productId).addClass("invisible");
            }
        });
    </script>

    @if (Model.FreeShippingNotificationEnabled && Model.IsFreeShipping)
    {
        <div id="free-shipping-@Model.Id" class="free-shipping">
            <i class="fa fa-truck" aria-hidden="true"></i>
            <span>@T("Products.FreeShipping")</span>
        </div>
    }
    @if (!string.IsNullOrWhiteSpace(Model.DeliveryDate))
    {
        <div class="delivery-date">
            <span class="label">@T("Products.DeliveryDate"):</span>
            <span class="value">@Model.DeliveryDate</span>
        </div>
    }
</div>
}