@model Tuple<Hims.Shared.EntityModels.AppointmentLogModel, Hims.Domain.Configurations.IPayUConfiguration>
@{
    Layout = null;

}
<!DOCTYPE html>
<html>
<head>
    <title>Appointment Preview | Careaxes</title>
    <meta content="Careaxes" name="description">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="application-name" content="Careaxes REST API"/>
    <link rel="shortcut icon" href="@Url.Content("~/assets/images/favicon.png")">
    <link type="text/css" href="@Url.Content("~/assets/fonts/style.css")" rel="stylesheet">
    <link type="text/css" href="@Url.Content("~/assets/css/bootstrap.min.css")" rel="stylesheet">
    <link type="text/css" href="@Url.Content("~/assets/css/style.css")" rel="stylesheet">
    <link type="text/css" href="@Url.Content("~/assets/css/custom.css")" rel="stylesheet">
</head>
<body>
<div class="appointment-container">
    <div class="appointment-content">
        @{
            var appointmentLog = Model.Item1;
            var config = Model.Item2;
            var dateTime = new DateTime(appointmentLog.AppointmentTime.Ticks);
            <form method="post" action="@config.PaymentURL">
                <div class="appintment-header">
                    Appointment Preview
                </div>
                <div class="appintment-body">
                    <input type="hidden" name="key" value="@config.Key"/>
                    <input type="hidden" name="hash" value="@ViewBag.Hash"/>
                    <input type="hidden" name="txnid" value="@ViewBag.TransactionId"/>
                    <input type="hidden" name="productinfo" value="@ViewBag.ProductInfo"/>
                    <input type="hidden" name="firstname" value="@appointmentLog.PatientFirstName"/>
                    <input type="hidden" name="lastname" value="@appointmentLog.PatientLastName"/>
                    <input type="hidden" name="email" value="@appointmentLog.PatientEmail"/>
                    <input type="hidden" name="phone" value="@appointmentLog.PatientMobile"/>
                    <input type="hidden" name="country" value="@appointmentLog.PatientCountryName"/>
                    <input type="hidden" name="amount" value="@appointmentLog.Total"/>
                    <input type="hidden" name="udf1" value="@appointmentLog.AppointmentLogId"/>
                    <input type="hidden" name="surl" value="@config.SuccessLink"/>
                    <input type="hidden" name="furl" value="@config.FailureLink"/>
                    <input type="hidden" name="service_provider" value="@config.ServiceProvider"/>
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="details-holder">
                                <div>
                                    @{
                                        if (string.IsNullOrEmpty(appointmentLog.ProviderThumbnailUrl))
                                        {
                                            <img alt="@appointmentLog.ProviderName" class="photo" src="@Url.Content("~/assets/images/avatar.png")">
                                        }
                                        else
                                        {
                                            <img alt="@appointmentLog.ProviderName" class="photo" src="@appointmentLog.ProviderThumbnailUrl">
                                        }

                                    }
                                </div>
                                <div>
                                    <h4 class="text-capitalize">Dr. @appointmentLog.ProviderName</h4>
                                    <h5 class="text-muted text-capitalize">@appointmentLog.PracticeName</h5>
                                </div>
                            </div>
                            <p class="label-text">
                                <span>Location</span><span>@appointmentLog.ProviderLocation</span>
                            </p>
                            <p class="label-text">
                                <span>Date</span><span>@appointmentLog.AppointmentDate.ToString("D")</span>
                            </p>
                            <p class="label-text">
                                <span>Time</span><span>@dateTime.ToString("hh:mm tt")</span>
                            </p>
                            <p class="label-text">
                                <span>Amount</span><span>@appointmentLog.CurrencySymbol @appointmentLog.Total.ToString("##.00")</span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="appintment-footer">
                    <div class="small-buttons">
                        <button type="submit" class="ybtn ybtn-accent-color" formtarget="_blank">Proceed to Payment</button>
                        <button type="button" class="ybtn ybtn-white ybtn-shadow">Cancel</button>
                    </div>
                </div>
            </form>

        }
    </div>
</div>
</body>
</html>