@extends('Admin.layouts.master')

@section('content')
@php
$currentPage = 'manage-restaurant_app';
@endphp




<div class="layout-px-spacing">
    <div class="middle-content container-xxl p-0">
        <div class="row layout-top-spacing ">
            <div class="top-tabel">
                <div class="row">
                    <div class="col-md-4 left">
                        <a class="d-flex align-items-center justify-content-center pl-2" href="{{ route('restraunt_users') }}">
                            <img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
                            <h6 class="card-title p-0">View Details</h6>
                        </a>
                    </div>
                </div>


            </div>
            <div class="col-xl-12 col-lg-12 col-sm-12  layout-spacing">
                <div class="widget-content widget-content-area br-8 position-btn p-0">
                    <div class="view-details">
                        <div class="simple-tab">
                            <div class="tab-content" id="myTabContent">
                                <div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel" aria-labelledby="home-tab" tabindex="0">
                                    <div class="row">
                                        <div class="col-md-6 mb-10 tabs23">
                                            <table>
                                                <tr class="title">
                                                    <td>Restaurants Name :</td>
                                                    <td>Restaurant ID :</td>
                                                    <td>Email ID :</td>
                                                    <!-- <td>Description :</td> -->
                                                    <td>Start Date :</td>
                                                    <!-- <td>Image :</td> -->
                                                </tr>
                                                <tr class="w-100">

                                                  <td>{{ $restdata->restaurant->name ?? 'NA' }}</td>
                                                  <td>{{ $restdata->restaurant->restaurant_id ?? 'NA' }}</td>
                                                  <td>{{ $restdata->customer->email_address ?? 'NA' }}</td>
                                                  <td>{{ $restdata->customer->created_at ?? 'NA' }}</td>

                                                </tr>



                                            </table>

                                        </div>
                                        <div class="col-md-6 mb-10">
                                            <table>
                                                <tr class="title">
                                                    <td>Location :</td>
                                                    <!-- <td>Onboarded date :</td> -->
                                                    <td>Phone Number :</td>
                                                    <!-- <td>Bio :</td>
                                                    <td>End Date :</td>
                                                    <td>While at Restaurant be sure to try :</td> -->
                                                </tr>
                                                <tr class="w-100">
                                                    <td>{{ $restdata->customer->state_xid}}</td>
                                                    <td>{{ $restdata->customer->phone_number}}</td>
                                                    <!-- <td>lorem ipsum</td>
                                                    <td>19/12/2023</td>
                                                    <td class="d-flex flex-column justify-content-start">
                                                        <p class="w-100">Lorem Ipsum Lorem Ipsum</p>
                                                        <p class="w-100">Lorem Ipsum Lorem Ipsum</p>
                                                        <p class="w-100">Lorem Ipsum Lorem Ipsum</p>
                                                        <p class="w-100">Lorem Ipsum Lorem Ipsum</p>

                                                    </td> -->
                                                </tr>

                                            </table>
                                        </div>
                                        <div class="col-md-6">
                                            <!-- <a class="download-btn-custom mt-3" href="">
                                                <span>Download user report</span>
                                                <img src="{{ asset('public/assets/img/download.svg') }}" />

                                            </a> -->
                                        </div>
                                    </div>

                                </div>
                            </div>

                        </div>


                    </div>

                </div>
            </div>
        </div>
    </div>
</div>




@endsection

@section('section_script')
<script>
    const imageInputEdit = document.getElementById('imageInputNormal');
    const imagePreviewEdit = document.getElementById('imageInputPreviewNormal');

    imageInputEdit.addEventListener('change', function() {
        const file = this.files[0];
        if (file) {
            const reader = new FileReader();
            reader.onload = function(event) {
                const img = document.createElement('img');
                img.src = event.target.result;
                img.style.maxWidth = '200px';
                img.style.maxHeight = '200px';
                imagePreviewEdit.innerHTML = '';
                imagePreviewEdit.appendChild(img);
            };
            reader.readAsDataURL(file);
        } else {
            imagePreviewEdit.innerHTML = '';
        }
    });
</script>
@endsection
