<?php
if (!isset($facility_image) || $facility_image == '') {
    $facility_image = "/assets/img/bg/provider-1.jpg";
}

if (!isset($facility_text) || $facility_text == '') {
    $facility_text = "MERMS Panel";
}
?>

<!-- begin app -->
<div class="app">
    <!-- begin app-wrap -->


    <div class="app-wrap">
        <!-- begin pre-loader -->
        <div class="loader">
            <div class="h-100 d-flex justify-content-center">
                <div class="align-self-center">
                    <img src="assets/img/loader/loader.svg" alt="loader">
                </div>
            </div>
        </div>
        <!-- end pre-loader -->

        <!--start login contant-->
        <div class="app-contant">
            <div class="bg-white">
                <div class="container-fluid p-0">
                    <div class="row no-gutters">
                        <div class="col-sm-6 col-lg-5 col-xxl-3  align-self-center order-2 order-sm-1">


                            <div class="d-flex align-items-center h-100-vh">
                                <div class="login p-50">

<!--                                    <div class="row">-->
<!--                                        <div class="col-6">-->
<!--                                            <div class="app-store-icons-wrap text-center">-->
<!--                                                <a class="icon google " href="https://play.google.com/store/apps/details?id=com.mermsemr.providers" target="_blank"></a>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!---->
<!--                                        <div class="col-6">-->
<!--                                            <div class="app-store-icons-wrap text-center">-->
<!--                                                <a class="icon apple " href="https://play.google.com/store/apps/details?id=com.mermsemr.providers" target="_blank"></a>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </div>-->
                                    
                                  
                                    <h1 class="mb-2"><?= $facility_text ?></h1>
                                    <p>Welcome back, please login to your account.</p>
                                    <form id='loginForm' action="/login" method='POST' class="mt-3 mt-sm-5">

                                        <div class="row">
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label class="control-label">User Name*</label>
                                                    <input type="text" class="form-control" name='username' value='' placeholder="Username" />
                                                </div>
                                            </div>
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label class="control-label">Password*</label>
                                                    <input type="password" class="form-control" name='pass' value='' placeholder="Password" />
                                                </div>
                                            </div>
                                            <div class="col-12">
                                                <div class="d-block d-sm-flex  align-items-center">
                                                    <div class="form-check">
                                                        <input class="form-check-input" type="checkbox" id="gridCheck">
                                                        <label class="form-check-label" for="gridCheck">
                                                            Remember Me
                                                        </label>
                                                    </div>
                                                    <a href="/register/resetpass" class="ml-auto">Forgot Password ?</a>
                                                </div>
                                            </div>
                                            <div class="col-12 mt-3">
                                                <?= isset($error_message) ? "<span class='mr-2 mb-2 mr-sm-0 mb-sm-0 badge badge-danger-inverse'>" . $error_message . "</span>" : ''; ?>
                                            </div>
                                            <div class="col-12 mt-3" style="text-align: right;">
                                                <button type="submit" class="btn btn-primary">Sign In</button>
                                            </div>
                                            <div class="col-12  mt-3">
                                                <p>Don't have an account ?<a href="/register"> Sign Up</a></p>
                                            </div>
                                        </div>
                                    </form>

                                    <div class="row" style="margin-top: 20px;">
                                        <div class="col-6">
                                            <div class="app-store-icons-wrap text-center">
                                                <a class="icon google " href="https://play.google.com/store/apps/details?id=com.mermsemr.providers" target="_blank"></a>
                                            </div>
                                        </div>

                                        <div class="col-6">
                                            <div class="app-store-icons-wrap text-center">
                                                <a class="icon apple " href="https://play.google.com/store/apps/details?id=com.mermsemr.providers" target="_blank"></a>
                                            </div>
                                        </div>
                                    </div>

                                </div>

                            </div>
                        </div>
                        <div class="col-sm-6 col-xxl-9 col-lg-7  o-hidden order-1 order-sm-2" style="background-color:red; background-image: url('<?= $facility_image ?>');  background-size: cover;">
                            <!-- img class="img-fluid" src="assets/img/bg/provider.jpg"  alt="" style="background-size:contain;" -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--end login contant-->
</div>
<!-- end app-wrap -->


