  <!--start main wrapper-->
    <main class="main-wrapper">
        <div class="main-content">
            <div class="d-flex justify-content-between flex-wrap gap-2">
                <button class="btn guestBtn d-flex gap-2 align-items-center" id="backBtn"><img
                        src="<?php echo base_url(); ?>assets/images/arowleft.svg" alt="" width="15px"> Back</button>
                <div class="d-flex gap-2 align-items-center">
                    <?php if($reservation['isApproved']=="pending"){ ?>
                    <button class="btn btn-approv px-3" data-bs-toggle="modal"
                        data-bs-target="#approvModal">Approve</button>
                    <button class="btn btn-deny px-3" data-bs-toggle="modal" data-bs-target="#denyModal">
                        Deny</button>
                    <?php } ?>
                    <!-- Modal for Deny Reason -->
                    <div class="modal fade" id="denyModal" tabindex="-1" aria-labelledby="denyModalLabel"
                        aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h5 class="modal-title" id="denyModalLabel">Deny Reason</h5>
                                    <button type="button" class="btn-close" data-bs-dismiss="modal"
                                        aria-label="Close"></button>
                                </div>
                                <form action="<?php echo base_url().'site/submitDenyReason'; ?>" method="post">
                                <div class="modal-body">
                                    <input class="form-control my-2" type="text" name="deny_title" id="deny_title"
                                        placeholder="Title">
                                    <textarea class="form-control" id="denyReason" name="denyReason" rows="4"
                                        placeholder="Enter the reason for denial"></textarea>
                                        <input type="hidden" name="reservationId" id="reservationId" value="<?php echo $reservationId; ?>">
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-secondary"
                                        data-bs-dismiss="modal">Cancel</button>
                                    <button type="button" class="btn btn-danger"
                                        onclick="submitDenyReason()">Submit</button>
                                </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <!-- Modal for approv Reason -->
                    <div class="modal fade" id="approvModal" tabindex="-1" aria-labelledby="denyModalLabel"
                        aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h5 class="modal-title" id="denyModalLabel">Approv Reason</h5>
                                    <button type="button" class="btn-close" data-bs-dismiss="modal"
                                        aria-label="Close"></button>
                                </div>
                                <form action="<?php echo base_url().'site/submitApprovReason'; ?>" method="post">
                                <div class="modal-body">
                                    <input class="form-control my-2" type="text" name="approved_title" id="approved_title"
                                        placeholder="Title">
                                       <input type="hidden" name="reservationId" id="reservationId" value="<?php echo $reservationId; ?>">
                                    <textarea class="form-control" id="approvedReason" name="approvedReason" rows="4"
                                        placeholder="Enter the reason for approval"></textarea>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-secondary"
                                        data-bs-dismiss="modal">Cancel</button>
                                    <button type="submit" class="btn btn-success"
                                        >Submit</button>
                                </div>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <!-- <div class="row my-3">

                <div class="col-md-12 my-3">
                    <div class="custom-toolbar px-3 py-2">
                        <p class="mb-0 ft8">Casa Club # 1</p>
                    </div>
                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <p class="ft10 mb-1">Unit: <span>200</span></p>
                            <p class="ft10 mb-1">Reservation date: <span>21 May, 2024</span></p>
                            <p class="ft10 mb-1">Slot: <span>8-10AM</span></p>
                            <p class="ft10 mb-1">Price: <span>$25</span></p>
                            <p class="ft10 mb-1">Is Paid: <span>No</span></p>
                            <p class="ft10 mb-1">No. of people: <span>10</span></p>
                            <p class="ft10 mb-1">User: <span>Ernesto Candido Este</span></p>
                            <p class="ft10 mb-1">Issue No. Associated: <span>23</span></p>

                        </div>
                    </div>
                </div>
                <div class="col-md-12 my-3">
                    <div class="custom-toolbar px-3 py-2">
                        <p class="mb-0 ft8">User Notes</p>
                    </div>
                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <p class="ft10 mb-1">Lorem Ipsum is simply dummy text of the printing and typesetting
                                industry.
                                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an
                                unknown printer took a galley of type and scrambled it to make a type specimen book. It
                                has survived not only five centuries, but also the leap into electronic typesetting,
                                remaining essentially unchanged.</p>

                        </div>
                    </div>
                </div>
                <div class="col-md-12 my-3">
                    <div class="custom-toolbar px-3 py-2">
                        <p class="mb-0 ft8">Security Notes</p>
                    </div>
                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <p class="ft10 mb-1">Lorem Ipsum is simply dummy text of the printing and typesetting
                                industry.
                                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an
                                unknown printer took a galley of type and scrambled it to make a type specimen book. It
                                has survived not only five centuries, but also the leap into electronic typesetting,
                                remaining essentially unchanged.</p>

                        </div>
                    </div>
                </div>
            </div> -->
            <div class="row my-3">
                <div class="col-md-12 my-3">

                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <div class="row my-2">
                                <div class="col-md-3">
                                    <p class="mb-0 ft8 fw-bold"><?php echo $reservation['eventName']; ?></p>
                                </div>
                                <!-- <div class="col-md-9">

                                    <div class="d-flex gap-5 flex-wrap my-2 justify-content-between pe-5">
                                        <p class="ft10 fw-bold">Unit <br> <span>200</span></p>
                                        <p class="ft10 fw-bold">Reservation date <br><span>21 May, 2024</span></p>
                                        <p class="ft10 fw-bold">Slot <br> <span>8-10AM</span></p>
                                    </div>
                                    <div class="d-flex gap-5 flex-wrap my-2 justify-content-between pe-5">
                                        <p class="ft10 fw-bold">Price <br> <span>$25</span></p>
                                        <p class="ft10 fw-bold">Is Paid <br> <span>No</span></p>
                                        <p class="ft10 fw-bold">No. of people <br> <span>10</span></p>
                                    </div>
                                    <div class="d-flex gap-5 flex-wrap my-2">

                                        <p class="ft10 fw-bold">User <br> <span>Ernesto Candido Este</span></p>
                                        <p class="ft10 fw-bold ms-5">Issue No. Associated <br> <span>23</span></p>
                                    </div>

                                </div> -->
<?php 
// echo "<pre>";
// print_r($reservation);
// echo "</pre>";
?>


                                <div class="col-md-9">
                                    <div class="row my-2 align-items-start">
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">Unit <br> <span><?php echo getUnitName($reservation['unitId']); ?></span></p>
                                        </div>
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">Reservation date <br> <span><?php echo date('d M Y', strtotime($reservation['eventDate'])); ?></span></p>
                                        </div>
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">Slot <br> <span><?php echo $reservation['reservedSlot']; ?></span></p>
                                        </div>
                                    </div>
                                    <div class="row my-2 align-items-start">
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">Price <br> <span>$<?php echo "100"; ?></span></p>
                                        </div>
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">Is Paid <br> <span>No</span></p>
                                        </div>
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">No. of people <br> <span><?php echo $reservation['numberOfPersons']; ?></span></p>
                                        </div>
                                    </div>
                                    <div class="row my-2 align-items-start">
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">User <br> <span><?php echo getusername($reservation['userId']); ?></span></p>
                                        </div>
                                        <div class="col-md-4">
                                            <p class="ft10 fw-bold">Issue No. Associated <br> <span>23</span></p>
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <hr>

                            <div class="row">
                                <div class="col-md-3">
                                    <p class="mb-0 ft8 fw-bold">User Notes</p>

                                </div>
                                <div class="col-md-9">
                                    <p class="ft10 "><?php echo $reservation['note']; ?></p>
                                </div>
                            </div>
                            <hr>
                            <div class="row">
                                <div class="col-md-3">
                                    <p class="mb-0 ft8 fw-bold">Security Notes</p>

                                </div>
                                <div class="col-md-9">
                                    <p class="ft10 ">Lorem Ipsum is simply dummy text of the printing and
                                        typesetting
                                        industry.
                                        Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
                                        when an
                                        unknown printer took a galley of type and scrambled it to make a type specimen
                                        book. It
                                        has survived not only five centuries, but also the leap into electronic
                                        typesetting,
                                        remaining essentially unchanged.</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>


    </main>
    <!--end main wrapper-->
