@model ShoppingCartModel.OrderReviewDataModel
@if (Model.Display)
{
    <div class="order-review-data row">
       <div class="billing-info-wrap  col-sm-6 col-md-6">
           <div class="billing-info">
               <div class="title">
                   <strong>@T("Order.BillingAddress")</strong>
               </div>
               <ul class="info-list">
                   <li class="name">
                       @Model.BillingAddress.FirstName @Model.BillingAddress.LastName
                   </li>
                   <li class="email">
                       <span>@T("Order.Email"):</span> @Model.BillingAddress.Email
                   </li>
                   @if (Model.BillingAddress.PhoneEnabled)
                   {
                       <li class="phone">
                           <span>@T("Order.Phone"):</span> @Model.BillingAddress.PhoneNumber
                       </li>
                   }
                   @if (Model.BillingAddress.FaxEnabled)
                   {
                       <li class="fax">
                           <span>@T("Order.Fax"):</span> @Model.BillingAddress.FaxNumber
                       </li>
                   }
                   @if (Model.BillingAddress.CompanyEnabled && !string.IsNullOrEmpty(Model.BillingAddress.Company))
                   {
                       <li class="company">
                           @Model.BillingAddress.Company
                       </li>
                   }
                    @foreach (var item in Model.BillingAddress.AddressFields)
                    {
                        <li class=@item.Key.ToString().ToLower()>@item.Value</li>
                    }
                   @if (!string.IsNullOrEmpty(Model.BillingAddress.FormattedCustomAddressAttributes))
                   {
                       <li class="custom-attributes-view">
                           @Html.Raw(Model.BillingAddress.FormattedCustomAddressAttributes)
                       </li>
                   }
                   @if (Model.CustomValues != null)
                   {
                       foreach (var item in Model.CustomValues)
                       {
                           <li class="custom-value">
                               <span class="label">
                                   @item.Key:
                               </span>
                               <span class="value">
                                   @(item.Value != null ? item.Value.ToString() : "")
                               </span>
                           </li>
                       }
                   }
                    @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.OrderSummaryBillingAddress, additionalData = Model })
               </ul>
               </div>
               @if (!string.IsNullOrEmpty(Model.PaymentMethod))
                {
                <div class="payment-method-info">
                    <div class="title">
                        <strong>@T("Order.Payment")</strong>
                    </div>
                    <ul class="info-list">
                        <li class="payment-method">
                            <span class="label">
                                @T("Order.Payment.Method"):
                            </span>
                            <span class="value">
                                @Model.PaymentMethod
                            </span>
                        </li>
                        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.OrderSummaryPaymentMethodInfo, additionalData = Model })
                    </ul>
                </div>
               }
           </div>

        @if (Model.IsShippable)
        {
            <div class="shipping-info-wrap col-sm-6 col-md-6">
                <div class="shipping-info">
                    <div class="title">
                        <strong>
                            @(Model.SelectedPickupInStore ? T("Order.PickupAddress") : T("Order.ShippingAddress"))
                        </strong>
                    </div>
                    <ul class="info-list">
                        @if (!Model.SelectedPickupInStore)
                        {
                            <li class="name">
                                @Model.ShippingAddress.FirstName @Model.ShippingAddress.LastName
                            </li>
                            <li class="email">
                                <span>@T("Order.Email"):</span> @Model.ShippingAddress.Email
                            </li>
                            if (Model.ShippingAddress.PhoneEnabled)
                            {
                                <li class="phone">
                                    <span>@T("Order.Phone"):</span> @Model.ShippingAddress.PhoneNumber
                                </li>
                            }
                            if (Model.ShippingAddress.FaxEnabled)
                            {
                                <li class="fax">
                                    <span>@T("Order.Fax"):</span> @Model.ShippingAddress.FaxNumber
                                </li>
                            }
                            if (Model.ShippingAddress.CompanyEnabled && !string.IsNullOrEmpty(Model.ShippingAddress.Company))
                            {
                                <li class="company">
                                    @Model.ShippingAddress.Company
                                </li>
                            }
                            @foreach (var item in Model.ShippingAddress.AddressFields)
                            {
                                <li class=@item.Key.ToString().ToLower()>@item.Value</li>
                            }
                            if (!string.IsNullOrEmpty(Model.ShippingAddress.FormattedCustomAddressAttributes))
                            {
                                <li class="custom-attributes-view">
                                    @Html.Raw(Model.ShippingAddress.FormattedCustomAddressAttributes)
                                </li>
                            }
                            @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.OrderSummaryShippingAddress, additionalData = Model })
                        }
                        else
                        {

                            @foreach (var item in Model.PickupAddress.AddressFields)
                            {
                                <li class=@item.Key.ToString().ToLower()>@item.Value</li>
                            }
                        }
                    </ul>
                    </div>
                    <div class="shipping-method-info">
                        <div class="title">
                            <strong>@T("Order.Shipping")</strong>
                        </div>
                        <ul class="info-list">                            
                            <li class="shipping-method">
                                <span class="label">
                                    @T("Order.Shipping.Name"):
                                </span>
                                <span class="value">
                                    @Model.ShippingMethod
                                </span>
                            </li>
                            @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.OrderSummaryShippingMethodInfo, additionalData = Model })
                        </ul>
                    </div>
                </div>
        }
    </div>   
}
