@extends('layouts.website.website')
@section('content')
<section id="main-content">
    <section class="wrapper site-min-height">
        <!-- page start-->
        <section class="col-md-8">
            <header class="panel-heading">
                Live Appointment
            </header>
            @php
                $auth_user = \Auth::user();
            @endphp
            <div class="">
                <div class="tab-content" id="meeting">
                    <img class="meeting_logo" src="https://smartcarehms.com/contents/frontend/img/tlogo.png" alt="">
                    {{-- <img class="meeting_logo_right" src="https://smartcarehms.com/Logo_call.png" alt=""> --}}
                    <input type="hidden" name="appointmentid" id="appointmentid" value="{{ isset( $_GET['id']) ?  $_GET['id'] : '0' }}" />
                    <input type="hidden" name="username" id="username" value="{{ $auth_user->name }} {{ $auth_user->last_name }}" />
                    <input type="hidden" name="email" id="email" value="{{ $auth_user->email }}" />
                </div>
            </div>
        </section>

        <section class="col-md-4">
            <header class="panel-heading">
                Appointment Details
            </header>

            <div class="">
                <div class="tab-content" id="">
                    <aside class="profile-nav">
                        <section class="">
                            <ul class="nav nav-pills nav-stacked">
                                <!--  <li class="active"> Doctor Name<span class="label pull-right r-activity">Mr Doctor</span></li> -->
                                <li>Doctor Name <span class="label pull-right r-activity">Mr Doctor</span></li>
                                <li>Patient Name <span class="label pull-right r-activity">Amadou Diop</span></li>
                                <li>Patient ID<span class="label pull-right r-activity">61</span></li>
                                <li>Appointment Date <span class="label pull-right r-activity">2nd October, 2020</span></li>
                                <li>Appointment Slot<span class="label pull-right r-activity">10:45 PM To 11:00 PM</span></li>
                            </ul>
                        </section>
                    </aside>
                </div>
            </div>
        </section>
        <!-- page end-->
    </section>
</section>

<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>


<script src="https://meet.jit.si/external_api.js"></script>
<script>
    $(document).ready(function () {
        //  console.log($('#email').val());
        const domain = "meet.jit.si";
        document.getElementById('meeting');
        const options = {
            roomName: "smart-care-765431234-5"+$('#appointmentid').val()+"54",
            height: 500,
            parentNode: document.querySelector("#meeting"),
            userInfo: {
                email: $('#email').val(),
                displayName: $('#username').val()
            },
            enableClosePage: true,
            SHOW_PROMOTIONAL_CLOSE_PAGE: true,
            // ALWAYS_TRUST_MODE_ENABLED=true
        };
        const api = new JitsiMeetExternalAPI(domain, options);
    });
</script>

@endsection
