<?php $__env->startSection('content'); ?>

    <main>

        <!-- Start profile_pg -->
        <section class="profile_pg section">
            <div class="container">
                <div class="row">
                    <div class="col-lg-3">
                        <div class="prof_r">
                            <div class="d-flex align-items-center mb-5">
                                <img src="<?php echo e(asset($user->photo)); ?>" class="avatar_img" alt=""/>
                                <div class="ms-3">
                                    <h5 class="fw-bold"><?php echo e($user->name); ?></h5>
                                    <p class="mb-0"><?php echo e($user->email); ?></p>
                                </div>
                            </div>
                            <div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical">
                                <button class="nav-link active" id="v-pills-tab1-tab" data-bs-toggle="pill" data-bs-target="#v-pills-tab1" type="button" role="tab" aria-controls="v-pills-tab1" aria-selected="true">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/profile_tab_1.svg" class="icon icon-18 me-2" alt="">  بياناتي الشخصية
                                </button>
                                <?php if($user->role == 'provider'): ?>
                                <button class="nav-link" id="v-pills-tab2-tab" data-bs-toggle="pill" data-bs-target="#v-pills-tab2" type="button" role="tab" aria-controls="v-pills-tab2" aria-selected="false">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/profile_tab_2.svg" class="icon icon-18 me-2" alt=""> العنوان
                                </button>
                                <button class="nav-link" id="v-pills-tab3-tab" data-bs-toggle="pill" data-bs-target="#v-pills-tab3" type="button" role="tab" aria-controls="v-pills-tab3" aria-selected="false">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/profile_tab_3.svg" class="icon icon-18 me-2" alt="">   الصور
                                </button>
                                <button onclick="showEvents()" class="nav-link" id="v-pills-tab4-tab" data-bs-toggle="pill" data-bs-target="#v-pills-tab4" type="button" role="tab" aria-controls="v-pills-tab4" aria-selected="false">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/profile_tab_4.svg" class="icon icon-18 me-2" alt="">   الفعاليات
                                </button>
                                <button onclick="showRates()" class="nav-link" id="v-pills-tab7-tab" data-bs-toggle="pill" data-bs-target="#v-pills-tab7" type="button" role="tab" aria-controls="v-pills-tab7" aria-selected="false">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/profile_tab_7.svg" class="icon icon-18 me-2" alt="">  التقييمات
                                </button>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-9">
                        <div class="tab-content" id="v-pills-tabContent">
                            <div class="tab-pane fade show active" id="v-pills-tab1" role="tabpanel" aria-labelledby="v-pills-tab1-tab">
                                <div class="tab_wrapper prof_tab">
                                    <div class="data_box">
                                        <?php if($user->role == 'provider'): ?>
                                        <div class="row align-items-center mb-5">
                                            <div class="col-lg-5">
                                                <div class="d-flex align-items-center">
                                                    <p class="label me-5 mb-0">اللوجو</p>
                                                    <img src="<?php echo e(asset($user->photo)); ?>" class="logo" alt=""/>
                                                </div>
                                            </div>
                                            <div class="col-lg-7">
                                                <div class="d-flex align-items-center">
                                                    <p class="label me-5 mb-0">صورة السجل التجاري</p>
                                                    <div class="col-8">
                                                        <img src="<?php echo e(asset($user->commerical_photo)); ?>" class="sec-img" alt=""/>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <?php endif; ?>
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1">إسم الشخص المسئول</p>
                                                        <h6 class="data fw-bold mb-0"><?php echo e($user->name); ?></h6>
                                                    </div>
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                </div>
                                            </div>
                                            <?php if($user->role == 'provider'): ?>
                                            <div class="col-lg-6">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1"> إسم المطعم / الكافيه</p>
                                                        <h6 class="data fw-bold mb-0">  <?php echo e($user->descriptions()->name); ?>   </h6>
                                                    </div>
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                </div>
                                            </div>
                                            <div class="col-lg-6">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1">    السجل التجاري </p>
                                                        <h6 class="data fw-bold mb-0"> <?php echo e($user->commerical_log); ?>    </h6>
                                                    </div>
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_2.svg" class="icon" alt=""/>
                                                </div>
                                            </div>
                                            <?php endif; ?>
                                            <div class="col-lg-<?php echo e($user->role == 'provider' ? '6' : '12'); ?>">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1">كلمة المرور</p>
                                                        <h6 class="data fw-bold mb-0"> ************    </h6>
                                                    </div>
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_3.svg" class="icon" alt=""/>
                                                </div>
                                            </div>
                                            <div class="col-lg-<?php echo e($user->role == 'provider' ? '6' : '12'); ?>">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1"> الإيميل  </p>
                                                        <h6 class="data fw-bold mb-0"> <?php echo e($user->email); ?>   </h6>
                                                    </div>
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_4.svg" class="icon" alt=""/>
                                                </div>
                                            </div>
                                            <div class="col-lg-12">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1">
                                                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_5.svg" class="icon icon-18 me-2" alt=""/>
                                                            رقم الجوال
                                                        </p>
                                                        <h6 class="data fw-bold mb-0"> <?php echo e($user->phone); ?>   </h6>
                                                    </div>
                                                </div>
                                            </div>
                                            <?php if($user->role == 'provider'): ?>
                                            <div class="col-lg-12">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1">
                                                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_6.svg" class="icon icon-18 me-2" alt=""/>
                                                            روابط التواصل الإجتماعي
                                                        </p>
                                                        <div class="social_links mt-2 d-flex justify-content-center">
                                                            <?php if($user->facebook): ?>
                                                                <a target="_blank" href="<?php echo e($user->facebook); ?>">
                                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-1.png" class="icon" alt=""/>
                                                                </a>
                                                            <?php endif; ?>
                                                            <?php if($user->instagram): ?>
                                                                <a target="_blank" href="<?php echo e($user->instagram); ?>">
                                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-2.png" class="icon" alt=""/>
                                                                </a>
                                                            <?php endif; ?>
                                                            <?php if($user->twitter): ?>
                                                                <a target="_blank" href="<?php echo e($user->twitter); ?>">
                                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-3.png" class="icon" alt=""/>
                                                                </a>
                                                            <?php endif; ?>
                                                            <?php if($user->whatsapp): ?>
                                                            <a target="_blank" href="https://api.whatsapp.com/send?phone=<?php echo e($user->whatsapp); ?>&text=">
                                                                <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-4.png" class="icon" alt=""/>
                                                            </a>
                                                            <?php endif; ?>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-12">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1">
                                                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_7.svg" class="icon icon-18 me-2" alt=""/>
                                                            أوقات الدوام
                                                        </p>
                                                        <h6 class="data fw-bold mb-0 d-flex align-items-center">
                                                            <?php echo e(date('g a',strtotime($user->start_time))); ?> - <?php echo e(date('g a',strtotime($user->end_time))); ?>

                                                            <?php if(date('H:i:s') >= $user->start_time && date('H:i:s') <= $user->end_time): ?>
                                                                <span class="badge ms-5">مفتوح</span>
                                                            <?php else: ?>
                                                                <span class="badge danger_badge ms-5">مغلق</span>
                                                            <?php endif; ?>
                                                        </h6>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-12">
                                                <div class="data_group d-flex align-items-center justify-content-between">
                                                    <div class="txt">
                                                        <p class="mb-1">
                                                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_4.svg" class="icon icon-18 me-2" alt=""/>
                                                            تفاصيل المكان
                                                        </p>
                                                        <h6 class="data fw-bold mb-0">
                                                            <?php echo $user->descriptions()->description; ?>

                                                        </h6>
                                                    </div>
                                                </div>
                                            </div>
                                            <?php endif; ?>
                                        </div>
                                        <button class="butn primary_butn m-auto mt-4 py-3 px-5 fw-bold" id="editButton"> تعديل </button>
                                    </div>
                                    <div class="editData_box">
                                        <div class="col-lg-6 m-auto">
                                            <form class="form" method="post" enctype="multipart/form-data" action="<?php echo e(url(getCurrentLocale().'/profile')); ?>" onsubmit="formAction(this)">
                                                <?php echo csrf_field(); ?>
                                                <div class="avatar_box m-auto mb-4">
                                                    <div class="profile-avatar" id="imagePreview" style="background-image: url('<?php echo e(asset($user->photo)); ?>');">
                                                        <input type="file" name="photo" class="custom-file-input" id="imageUpload" capture="">
                                                        <button><i class="far fa-edit"></i></button>
                                                    </div>
                                                    <span class="d-block mt-3 text-center mb-0 underline">لوجو مزود الخدمة</span>
                                                </div>
                                                <?php if($user->role == 'provider'): ?>
                                                    <div class="avatar_box m-auto mb-4">
                                                        <div class="profile-avatar" id="imagePreview" style="background-image: url('<?php echo e(asset($user->commerical_photo)); ?>');">
                                                            <input type="file" name="commerical_photo" class="custom-file-input" id="imageUpload" capture="">
                                                            <button><i class="far fa-edit"></i></button>
                                                        </div>
                                                        <span class="d-block mt-3 text-center mb-0 underline">لوجو مزود الخدمة</span>
                                                    </div>
                                                <?php endif; ?>
                                                <div class="form-group">
                                                    <input type="text" name="name" value="<?php echo e($user->name); ?>" class="form-control" placeholder="إسم الشخص المسئول" />
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                </div>
                                                <div class="form-group">
                                                    <input type="number" name="phone" value="<?php echo e($user->phone); ?>" class="form-control" placeholder=" رقم الجوال " />
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_5.svg" class="icon" alt=""/>
                                                </div>
                                                <div class="form-group">
                                                    <input type="text" name="email" value="<?php echo e($user->email); ?>" class="form-control" placeholder="الإيميل" />
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_4.svg" class="icon" alt=""/>
                                                </div>
                                                <?php if($user->role == 'provider'): ?>
                                                    <div class="form-group">
                                                        <input type="text" name="provider_name" value="<?php echo e($user->provider_name); ?>" class="form-control" placeholder=" إسم مزود الخدمة " />
                                                        <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                    </div>
                                                    <div class="form-group">
                                                        <input type="text" name="commerical_log" value="<?php echo e($user->commerical_log); ?>" class="form-control" placeholder="<?php echo e(__('web.commerical_log')); ?>" />
                                                        <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                    </div>
                                                    <div class="form-group">
                                                        <input type="number" name="cost" value="<?php echo e($user->cost); ?>" class="form-control" placeholder="<?php echo e(__('web.cost')); ?>" />
                                                        <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                    </div>
                                                    <div class="form-group">
                                                        <select name="category_id" class="form-control" >
                                                            <option value=""><?php echo e(__('web.category_id')); ?></option>
                                                            <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <option <?php echo e($user->category_id == $row->id ? 'selected' : ''); ?> value="<?php echo e($row->id); ?>"><?php echo e($row->name); ?></option>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </select>
                                                    </div>

                                                    <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                                        <div class="form-group">
                                                            <input type="text" name="name_<?php echo e($language->local); ?>" value="<?php echo e($user->descriptions($language->id)->name); ?>" class="form-control" placeholder="<?php echo e(__('web.name_'.$language->local)); ?>" />
                                                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                        </div>

                                                        <div class="form-group">
                                                            <textarea name="description_<?php echo e($language->local); ?>" class="form-control" placeholder="<?php echo e(__('web.description_'.$language->local)); ?>"><?php echo e($user->descriptions($language->id)->description); ?></textarea>
                                                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_1.svg" class="icon" alt=""/>
                                                        </div>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                                <?php endif; ?>
                                                <div class="form-group">
                                                    <input type="password" name="password" class="form-control" placeholder="كلمة المرور" />
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/prof_tab_3.svg" class="icon" alt=""/>
                                                </div>
                                                <?php if($user->role == 'provider'): ?>
                                                <div class="form-group">
                                                    <div class="row">
                                                        <div class="col-6">
                                                            <p class="label mb-2"> من   </p>
                                                            <input type="time" name="start_time" value="<?php echo e($user->start_time); ?>" class="form-control" placeholder=" من     " />
                                                        </div>
                                                        <div class="col-6">
                                                            <p class="label mb-2"> إلى   </p>
                                                            <input type="time" name="end_time" value="<?php echo e($user->end_time); ?>" class="form-control" placeholder=" من     " />
                                                        </div>
                                                    </div>
                                                </div>
                                                <p class="label mb-3 mt-4"> روابط التواصل الإجتماعي  </p>
                                                <div class="form-group">
                                                    <input type="url" name="facebook" class="form-control" placeholder="https:// facebook.com" value="<?php echo e($user->facebook); ?>" />
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-1.png" class="icon" alt=""/>
                                                </div>
                                                <div class="form-group">
                                                    <input type="url" name="instagram" class="form-control" placeholder="https:// instagram.com" value="<?php echo e($user->instagram); ?>" />
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-2.png" class="icon" alt=""/>
                                                </div>
                                                <div class="form-group">
                                                    <input type="url" name="twitter" class="form-control" placeholder="https:// twitter.com" value="<?php echo e($user->twitter); ?>" />
                                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-3.png" class="icon" alt=""/>
                                                </div>
                                                    <div class="form-group">
                                                        <input type="number" name="whatsapp" class="form-control" placeholder="9xxxxxxxxx" value="<?php echo e($user->whatsapp); ?>" />
                                                        <img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-4.png" class="icon" alt=""/>
                                                    </div>
                                                <?php endif; ?>
                                                <button type="submit" class="butn primary_butn m-auto mt-4 py-3 px-5 fw-bold"> حفظ </button>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php if($user->role == 'provider'): ?>
                            <div class="tab-pane fade" id="v-pills-tab2" role="tabpanel" aria-labelledby="v-pills-tab2-tab">
                                <div class="tab_wrapper loc_tab prof_tab">

                                        <div class="data_box mb-4 col-lg-12">
                                            <div class="data_group d-flex align-items-center justify-content-between">
                                                <div class="txt">
                                                    <p class="mb-1">
                                                        <img src="<?php echo e(url('')); ?>/assets/web/images/icons/profile_tab_2.svg" class="icon icon-18 me-2" alt=""/>
                                                        إسم المكان
                                                    </p>
                                                    <h6 class="data fw-bold mb-0"> <?php echo e($user->city->descriptions()->name .','.$user->country->descriptions()->name.','.$user->descriptions()->address); ?>   </h6>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">

                                            <iframe width="100%" height="240" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=<?php echo e($user->latlng); ?>&hl=en-US&amp;z=14&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"><a href="https://www.maps.ie/distance-area-calculator.html">measure distance on map</a></iframe>

                                        </div>
                                        <button  class="butn primary_butn m-auto mt-4 py-3 px-5 fw-bold" type="button" data-bs-toggle="modal" data-bs-target="#editLocModal">
                                            تعديل
                                        </button>

                                </div>
                            </div>
                            <div class="tab-pane fade" id="v-pills-tab3" role="tabpanel" aria-labelledby="v-pills-tab3-tab">
                                <div class="tab_wrapper imgs_tab">
                                    <div class="uploadingFiles_box mb-4">

                                        <div class="preview-images-zone">
                                            <?php $__currentLoopData = $user->photos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div class="preview-image preview-show-<?php echo e($key+1); ?>">
                                                <div class="image-cancel" data-id="<?php echo e($photo->id); ?>" onclick="deletePhoto(this)" data-no="<?php echo e($key+1); ?>">x</div>
                                                <div class="image-zone">
                                                    <img id="pro-img-<?php echo e($key+1); ?>" src="<?php echo e(asset($photo->image)); ?>" class="uploaded_img">
                                                </div>
                                            </div>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </div>
                                        <form id="uploadphotos">
                                            <?php echo csrf_field(); ?>
                                            <fieldset class="form-group mb-3" >
                                            <a href="javascript:void(0)" onclick="$('#pro-image').click();" class="upload_link">
                                                <img src="<?php echo e(url('')); ?>/assets/web/images/avatar-1.svg" class="upload_icon" alt="">
                                                إضافة صورة
                                            </a>
                                            <input type="file" name="image" onchange="uploadPhoto()" id="pro-image" name="pro-image" accept="" style="display: none;" class="form-control" multiple>
                                        </fieldset>
                                        </form>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane fade" id="v-pills-tab4" role="tabpanel" aria-labelledby="v-pills-tab4-tab">
                                <div class="tab_wrapper events_tab" id="events">

                                </div>
                            </div>

                            <div class="tab-pane fade" id="v-pills-tab7" role="tabpanel" aria-labelledby="v-pills-tab7-tab">
                                <div class="tab_wrapper rates_tab" id="rates">

                                </div>
                            </div>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </div>
        </section>

    </main>

    <?php if($user->role == 'provider'): ?>
    <div class="modal joiningModal editEventModal fade" id="addEventModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog  modal-dialog-centered modal-lg">
            <div class="modal-content">
                <div class="modal-body py-5">
                    <form class="col-lg-10 m-auto" method="post" enctype="multipart/form-data" action="<?php echo e(url(getCurrentLocale().'/creat/event')); ?>" onsubmit="formAction(this)">
                        <?php echo csrf_field(); ?>
                        <h1 class="title fs-2 fw-bold text-center mb-5"> إضافة الفعالية  </h1>
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="avatar_box m-auto mb-5">
                                    <div class="profile-avatar" id="imagePreview" style="background-image: url('<?php echo e(url('')); ?>/assets/web/images/avatar-1.svg');">
                                        <input type="file" name="images[]" class="custom-file-input" id="imageUpload" multiple capture="">
                                        <button><i class="far fa-edit"></i></button>
                                    </div>
                                    <span class="d-block mt-2 text-center mb-0 underline"> صورة الفعالية    </span>
                                </div>
                            </div>
                            <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-lg-6">
                                <div class="form-group mb-4">
                                    <input class="form-control" name="name_<?php echo e($language->local); ?>" placeholder="إسم الفعالية   <?php echo e($language->local); ?>"/>
                                </div>
                            </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-lg-6">
                                <div class="form-group mb-4">
                                    <input class="form-control" name="date" type="date" min="<?php echo e(date('Y-m-d')); ?>" placeholder=" تاريخ الفعالية "/>
                                </div>
                            </div>
                            <div class="col-lg-6"></div>
                            <div class="col-lg-6">
                                <div class="form-group mb-4">
                                    <input class="form-control" name="start_time" type="time" placeholder=" ميعاد الفعالية "/>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group mb-4">
                                    <input class="form-control" name="end_time" type="time" placeholder=" ميعاد الفعالية "/>
                                </div>
                            </div>

                            <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                <div class="col-lg-12">
                                    <div class="form-group mb-4">
                                        <textarea rows="10" name="description_<?php echo e($language->local); ?>" class="form-control" placeholder=" تفاصيل إضاقية   <?php echo e($language->local); ?>"></textarea>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>


                        <button type="submit" class="butn primary_butn m-auto mt-5 px-5 py-3"> <?php echo e(__('web.submit')); ?>  </button>
                    </form>
                </div>
            </div>
        </div>
    </div>


    <div class="modal joiningModal editEventModal fade" id="editLocModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog  modal-dialog-centered modal-lg">
            <div class="modal-content">
                <div class="modal-body py-5">
                    <form class="col-lg-10 m-auto" method="post" action="<?php echo e($action_address); ?>" onsubmit="formAction(this)">
                        <?php echo csrf_field(); ?>
                        <h1 class="title fs-2 fw-bold text-center mb-5"> تعديل العنوان   </h1>
                        <div class="row">
                            <div class="col-md-6">
                                <select onchange="countrySelect(this)" name="country_id" class="form-control form-select">
                                    <option value=""><?php echo e(__('web.country_id')); ?></option>
                                    <?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option  <?php echo e($user->country_id == $row->id ? 'selected' : ''); ?> value="<?php echo e($row->id); ?>"><?php echo e($row->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                                <div class="col-md-6">
                                    <select id="cities" name="city_id" class="form-control form-select">
                                        <option value=""><?php echo e(__('web.city_id')); ?></option>
                                        <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option  <?php echo e($user->city_id == $row->id ? 'selected' : ''); ?> value="<?php echo e($row->id); ?>"><?php echo e($row->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-lg-6">
                                    <div class="form-group mb-4">
                                        <input type="text" name="address_<?php echo e($language->local); ?>" value="<?php echo e($user->descriptions($language->id)->address); ?>" class="form-control" placeholder="  إسم المكان     <?php echo e($language->local); ?>"/>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <input type="hidden" name="latlng" id="latlng" value="<?php echo e($user->latlng); ?>">
                                    <div id="address-canvas">
                                        <div id="map" style=" height: 400px;border: 1px solid #000;"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <button type="submit" class="butn primary_butn m-auto mt-5 px-5 py-3"> حفظ  </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <?php endif; ?>

<?php $__env->startSection('inject_js'); ?>
    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB9i5KheHihWwx0k0y0xyqWy-RVLB9AqjU&callback=initMap"></script>


    <script>
        let url_show_events = <?php echo json_encode(url(getCurrentLocale().'/show/events')); ?>;
        let url_show_rates = <?php echo json_encode(url(getCurrentLocale().'/show/rates')); ?>;
        let url_show_photos = <?php echo json_encode(url(getCurrentLocale().'/show/photos')); ?>;
        let url_upload_photo = <?php echo json_encode(url(getCurrentLocale().'/upload/photos')); ?>;
        let url_delete_photo = <?php echo json_encode(url(getCurrentLocale().'/delete/photo')); ?>;
        let url_cities = <?php echo json_encode(url(getCurrentLocale().'/city')); ?>;

            var latlng = new google.maps.LatLng(<?php echo $user ?? ''  && $user->id ? $user->latlng : '21.4989, 39.2509'; ?>);
            var map = new google.maps.Map(document.getElementById('map'), {
                center: latlng,
                zoom: 11,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            });
            var marker = new google.maps.Marker({
                position: latlng,
                map: map,
                title: 'Set lat/lon values for this property',
                draggable: true
            });
            google.maps.event.addListener(marker, 'dragend', function(a) {
                console.log(a);
                var div = document.createElement('div');
                div.innerHTML = a.latLng.lat().toFixed(4) + ', ' + a.latLng.lng().toFixed(4);
                document.getElementsByTagName('body')[0].appendChild(div);
                $("#latlng").val(function() {
                    return  div.innerHTML;
                });
            });

        function countrySelect(elem)
        {
            let data_id = $(elem).val();

            $.ajax
            ({
                url : url_cities,
                type: 'GET',
                data: 'id='+data_id,
                success:function(data)
                {
                    $('#cities').html(data)
                }
            })
        }
    </script>
    <script src="<?php echo e(url('')); ?>/assets/web/js/custom/profileAction.js"></script>
<?php $__env->stopSection(); ?>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('web.layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/youdra/resources/views/web/pages/profile/profile.blade.php ENDPATH**/ ?>