<?php $__env->startSection('content'); ?>
    <div class="page-header">
        <h4 class="page-title"><?php echo e(__('Edit Event')); ?></h4>
        <ul class="breadcrumbs">
            <li class="nav-home">
                <a href="<?php echo e(route('admin.dashboard')); ?>">
                    <i class="flaticon-home"></i>
                </a>
            </li>
            <li class="separator">
                <i class="flaticon-right-arrow"></i>
            </li>
            <li class="nav-item">
                <a href="#"><?php echo e(__('Events Management')); ?></a>
            </li>
            <li class="separator">
                <i class="flaticon-right-arrow"></i>
            </li>
            <li class="nav-item">
                <a
                    href="<?php echo e(route('admin.event_management.event', ['language' => $defaultLang->code])); ?>"><?php echo e(__('All Events')); ?></a>
            </li>
            <li class="separator">
                <i class="flaticon-right-arrow"></i>
            </li>

            <?php
                $event_title = DB::table('event_contents')
                    ->where('language_id', $defaultLang->id)
                    ->where('event_id', $event->id)
                    ->select('title')
                    ->first();
                if (empty($event_title)) {
                    $event_title = DB::table('event_contents')->where('event_id', $event->id)->select('title')->first();
                }

            ?>
            <li class="nav-item">
                <a href="#">
                    <?php echo e(strlen($event_title->title) > 35 ? mb_substr($event_title->title, 0, 35, 'UTF-8') . '...' : $event_title->title); ?>

                </a>

            </li>
            <li class="separator">
                <i class="flaticon-right-arrow"></i>
            </li>

            <li class="nav-item">
                <a href="#"><?php echo e(__('Edit Event')); ?></a>
            </li>
        </ul>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    <div class="card-title d-inline-block"><?php echo e(__('Edit Event')); ?></div>


                    <a class="btn btn-info btn-sm float-right d-inline-block" href="<?php echo e(url()->previous()); ?>">
                        <span class="btn-label">
                            <i class="fas fa-backward"></i>
                        </span>
                        <?php echo e(__('Back')); ?>

                    </a>
                    <a class="mr-2 btn btn-success btn-sm float-right d-inline-block"
                        href="<?php echo e(route('event.details', ['slug' => eventSlug($defaultLang->id, $event->id), 'id' => $event->id])); ?>"
                        target="_blank">
                        <span class="btn-label">
                            <i class="fas fa-eye"></i>
                        </span>
                        <?php echo e(__('Preview')); ?>

                    </a>
                    <?php if($event->event_type == 'venue'): ?>
                        <a class="mr-2 btn btn-secondary btn-sm float-right d-inline-block"
                            href="<?php echo e(route('admin.event.ticket', ['language' => $defaultLang->code, 'event_id' => $event->id, 'event_type' => $event->event_type])); ?>"
                            target="_blank">
                            <span class="btn-label">
                                <i class="far fa-ticket"></i>
                            </span>
                            <?php echo e(__('Tickets')); ?>

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

                <div class="card-body">
                    <div class="row">
                        <div class="col-lg-8 mx-auto">
                            <div class="alert alert-danger pb-1 dis-none" id="eventErrors">
                                <button type="button" class="close" data-dismiss="alert">×</button>
                                <ul></ul>
                            </div>
                            <div class="col-lg-12">
                                <label for="" class="mb-2"><strong><?php echo e(__('Gallery Images')); ?> **</strong></label>
                                <div id="reload-slider-div">
                                    <div class="row mt-2">
                                        <div class="col">
                                            <table class="table" id="img-table">

                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <form action="<?php echo e(route('admin.event.imagesstore')); ?>" id="my-dropzone"
                                    enctype="multipart/formdata" class="dropzone create">
                                    <?php echo csrf_field(); ?>
                                    <div class="fallback">
                                        <input name="file" type="file" multiple />
                                    </div>
                                    <input type="hidden" value="<?php echo e($event->id); ?>" name="event_id">
                                </form>
                                <div class=" mb-0" id="errpreimg">

                                </div>
                                <p class="text-warning"><?php echo e(__('Image Size : 1170 x 570')); ?></p>
                            </div>

                            <form id="eventForm" action="<?php echo e(route('admin.event.update')); ?>" method="POST"
                                enctype="multipart/form-data">
                                <?php echo csrf_field(); ?>
                                <input type="hidden" name="event_id" value="<?php echo e($event->id); ?>">
                                <input type="hidden" name="event_type" value="<?php echo e($event->event_type); ?>">
                                <input type="hidden" name="gallery_images" value="0">
                                <div class="form-group">
                                    <label for=""><?php echo e(__('Thumbnail Image') . '*'); ?></label>
                                    <br>
                                    <div class="thumb-preview">
                                        <img src="<?php echo e($event->thumbnail ? asset('assets/admin/img/event/thumbnail/' . $event->thumbnail) : asset('assets/admin/img/noimage.jpg')); ?>"
                                            alt="..." class="uploaded-img">
                                    </div>
                                    <div class="mt-3">
                                        <div role="button" class="btn btn-primary btn-sm upload-btn">
                                            <?php echo e(__('Choose Image')); ?>

                                            <input type="file" class="img-input" name="thumbnail">
                                        </div>
                                    </div>
                                    <p class="text-warning"><?php echo e(__('Image Size : 320x230')); ?></p>
                                </div>

                                <div class="row">
                                    <div class="col-lg-12">
                                        <div class="form-group mt-1">
                                            <label for=""><?php echo e(__('Date Type') . '*'); ?></label>
                                            <div class="selectgroup w-100">
                                                <label class="selectgroup-item">
                                                    <input type="radio" name="date_type"
                                                        <?php echo e($event->date_type == 'single' ? 'checked' : ''); ?>

                                                        value="single" class="selectgroup-input eventDateType" checked>
                                                    <span class="selectgroup-button"><?php echo e(__('Single')); ?></span>
                                                </label>

                                                <label class="selectgroup-item">
                                                    <input type="radio" name="date_type"
                                                        <?php echo e($event->date_type == 'multiple' ? 'checked' : ''); ?>

                                                        value="multiple" class="selectgroup-input eventDateType">
                                                    <span class="selectgroup-button"><?php echo e(__('Multiple')); ?></span>
                                                </label>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row countDownStatus <?php echo e($event->date_type == 'multiple' ? 'd-none' : ''); ?> ">
                                    <div class="col-lg-12">
                                        <div class="form-group mt-1">
                                            <label for=""><?php echo e(__('Countdown Status') . '*'); ?></label>
                                            <div class="selectgroup w-100">
                                                <label class="selectgroup-item">
                                                    <input type="radio" name="countdown_status" value="1"
                                                        class="selectgroup-input"
                                                        <?php echo e($event->countdown_status == 1 ? 'checked' : ''); ?>>
                                                    <span class="selectgroup-button"><?php echo e(__('Active')); ?></span>
                                                </label>

                                                <label class="selectgroup-item">
                                                    <input type="radio" name="countdown_status" value="0"
                                                        class="selectgroup-input"
                                                        <?php echo e($event->countdown_status == 0 ? 'checked' : ''); ?>>
                                                    <span class="selectgroup-button"><?php echo e(__('Deactive')); ?></span>
                                                </label>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                
                                <div class="row <?php echo e($event->date_type == 'multiple' ? 'd-none' : ''); ?>" id="single_dates">
                                    <div class="col-lg-3">
                                        <div class="form-group">
                                            <label><?php echo e(__('Start Date"') . '*'); ?></label>
                                            <input type="date" name="start_date" value="<?php echo e($event->start_date); ?>"
                                                placeholder="Enter Start Date" class="form-control">
                                        </div>
                                    </div>

                                    <div class="col-lg-3">
                                        <div class="form-group">
                                            <label for=""><?php echo e(__('Start Time') . '*'); ?></label>
                                            <input type="time" name="start_time" value="<?php echo e($event->start_time); ?>"
                                                class="form-control">
                                        </div>
                                    </div>

                                    <div class="col-lg-3">
                                        <div class="form-group">
                                            <label><?php echo e(__('End Date"') . '*'); ?></label>
                                            <input type="date" name="end_date" value="<?php echo e($event->end_date); ?>"
                                                placeholder="Enter End Date" class="form-control">
                                        </div>
                                    </div>

                                    <div class="col-lg-3">
                                        <div class="form-group">
                                            <label for=""><?php echo e(__('End Time') . '*'); ?></label>
                                            <input type="time" name="end_time" value="<?php echo e($event->end_time); ?>"
                                                class="form-control">
                                        </div>
                                    </div>
                                </div>

                                
                                <div class="row">
                                    <div class="col-lg-12 <?php echo e($event->date_type == 'single' ? 'd-none' : ''); ?>"
                                        id="multiple_dates">
                                        <?php if($event->date_type == 'multiple'): ?>
                                            <?php
                                                $event_dates = $event->dates()->get();
                                            ?>
                                        <?php else: ?>
                                            <?php
                                                $event_dates = [];
                                            ?>
                                        <?php endif; ?>
                                        <div class="form-group">
                                            <div class="table-responsive">
                                                <table class="table table-bordered">
                                                    <thead>
                                                        <tr>
                                                            <th scope="col"><?php echo e(__('Start Date')); ?></th>
                                                            <th scope="col"><?php echo e(__('Start Time')); ?></th>
                                                            <th scope="col"><?php echo e(__('End Date')); ?></th>
                                                            <th scope="col"><?php echo e(__('End Time')); ?></th>
                                                            <th scope="col"><a href="javascrit:void(0)"
                                                                    class="btn btn-success addDateRow"><i
                                                                        class="fas fa-plus-circle"></i></a></th>
                                                        </tr>
                                                    <tbody>
                                                        <?php if(count($event_dates) > 0): ?>
                                                            <?php $__currentLoopData = $event_dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <tr>
                                                                    <td>
                                                                        <div class="form-group">
                                                                            <label
                                                                                for=""><?php echo e(__('Start Date') . '*'); ?></label>
                                                                            <input type="date" name="m_start_date[]"
                                                                                class="form-control"
                                                                                value="<?php echo e($date->start_date); ?>">
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="form-group">
                                                                            <label
                                                                                for=""><?php echo e(__('Start Time') . '*'); ?></label>
                                                                            <input type="time" name="m_start_time[]"
                                                                                class="form-control"
                                                                                value="<?php echo e($date->start_time); ?>">
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="form-group">
                                                                            <label
                                                                                for=""><?php echo e(__('End Date') . '*'); ?>

                                                                            </label>
                                                                            <input type="date" name="m_end_date[]"
                                                                                class="form-control"
                                                                                value="<?php echo e($date->end_date); ?>">
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="form-group">
                                                                            <label
                                                                                for=""><?php echo e(__('End Time') . '*'); ?>

                                                                            </label>
                                                                            <input type="time" name="m_end_time[]"
                                                                                class="form-control"
                                                                                value="<?php echo e($date->end_time); ?>">
                                                                        </div>
                                                                    </td>
                                                                    <input type="hidden" name="date_ids[]"
                                                                        value="<?php echo e($date->id); ?>">
                                                                    <td>
                                                                        <a href="javascript:void(0)"
                                                                            data-url="<?php echo e(route('admin.event.delete.date', $date->id)); ?>"
                                                                            class="btn btn-danger deleteDateDbRow">
                                                                            <i class="fas fa-minus"></i></a>
                                                                    </td>
                                                                </tr>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        <?php else: ?>
                                                            <tr>
                                                                <td>
                                                                    <div class="form-group">
                                                                        <label
                                                                            for=""><?php echo e(__('Start Date') . '*'); ?></label>
                                                                        <input type="date" name="m_start_date[]"
                                                                            class="form-control">
                                                                    </div>
                                                                </td>
                                                                <td>
                                                                    <div class="form-group">
                                                                        <label
                                                                            for=""><?php echo e(__('Start Time') . '*'); ?></label>
                                                                        <input type="time" name="m_start_time[]"
                                                                            class="form-control">
                                                                    </div>
                                                                </td>
                                                                <td>
                                                                    <div class="form-group">
                                                                        <label for=""><?php echo e(__('End Date') . '*'); ?>

                                                                        </label>
                                                                        <input type="date" name="m_end_date[]"
                                                                            class="form-control">
                                                                    </div>
                                                                </td>
                                                                <td>
                                                                    <div class="form-group">
                                                                        <label for=""><?php echo e(__('End Time') . '*'); ?>

                                                                        </label>
                                                                        <input type="time" name="m_end_time[]"
                                                                            class="form-control">
                                                                    </div>
                                                                </td>
                                                                <td>
                                                                    <a href="javascript:void(0)"
                                                                        class="btn btn-danger deleteDateRow">
                                                                        <i class="fas fa-minus"></i></a>
                                                                </td>
                                                            </tr>
                                                        <?php endif; ?>

                                                    </tbody>
                                                    </thead>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row ">
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <label for=""><?php echo e(__('Status') . '*'); ?></label>
                                            <select name="status" class="form-control">
                                                <option selected disabled><?php echo e(__('Select a Status')); ?></option>
                                                <option <?php echo e($event->status == '1' ? 'selected' : ''); ?> value="1">
                                                    <?php echo e(__('Active')); ?>

                                                </option>
                                                <option <?php echo e($event->status == '0' ? 'selected' : ''); ?> value="0">
                                                    <?php echo e(__('Deactive')); ?>

                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <label for=""><?php echo e(__('Is Feature') . '*'); ?></label>
                                            <select name="is_featured" class="form-control">
                                                <option selected disabled><?php echo e(__('Select')); ?></option>
                                                <option value="yes"
                                                    <?php echo e($event->is_featured == 'yes' ? 'selected' : ''); ?>>
                                                    <?php echo e(__('Yes')); ?>

                                                </option>
                                                <option value="no"
                                                    <?php echo e($event->is_featured == 'no' ? 'selected' : ''); ?>>
                                                    <?php echo e(__('No')); ?>

                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <label for=""><?php echo e(__('Organizer')); ?></label>
                                            <select name="organizer_id" class="form-control js-example-basic-single">
                                                <option value="" selected><?php echo e(__('Select Organizer')); ?></option>
                                                <?php $__currentLoopData = $organizers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $organizer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option <?php echo e($organizer->id == $event->organizer_id ? 'selected' : ''); ?>

                                                        value="<?php echo e($organizer->id); ?>"><?php echo e($organizer->username); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                            <p class="text-warning"><?php echo e(__("Please leave it blank for Admin's event")); ?>

                                            </p>
                                        </div>
                                    </div>
                                </div>
                                <?php if($event->event_type == 'online'): ?>
                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="form-group mt-1">
                                                <label
                                                    for=""><?php echo e(__('Total Number of Available Tickets') . '*'); ?></label>
                                                <div class="selectgroup w-100">
                                                    <label class="selectgroup-item">
                                                        <input type="radio" name="ticket_available_type"
                                                            value="unlimited" class="selectgroup-input"
                                                            <?php echo e(@$event->ticket->ticket_available_type == 'unlimited' ? 'checked' : ''); ?>>
                                                        <span class="selectgroup-button"><?php echo e(__('Unlimited')); ?></span>
                                                    </label>

                                                    <label class="selectgroup-item">
                                                        <input type="radio" name="ticket_available_type"
                                                            value="limited" class="selectgroup-input"
                                                            <?php echo e(@$event->ticket->ticket_available_type == 'limited' ? 'checked' : ''); ?>>
                                                        <span class="selectgroup-button"><?php echo e(__('Limited')); ?></span>
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-6 <?php echo e(@$event->ticket->ticket_available_type == 'limited' ? '' : 'd-none'); ?>"
                                            id="ticket_available">
                                            <div class="form-group">
                                                <label><?php echo e(__('Enter total number of available tickets') . '*'); ?></label>
                                                <input type="number" name="ticket_available"
                                                    placeholder="Enter total number of available tickets"
                                                    class="form-control" value="<?php echo e(@$event->ticket->ticket_available); ?>">
                                            </div>
                                        </div>
                                        <?php if($websiteInfo->event_guest_checkout_status != 1): ?>
                                            <div class="col-lg-6">
                                                <div class="form-group mt-1">
                                                    <label
                                                        for=""><?php echo e(__('Maximum number of tickets for each customer') . '*'); ?></label>
                                                    <div class="selectgroup w-100">
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="max_ticket_buy_type"
                                                                value="unlimited" class="selectgroup-input"
                                                                <?php echo e(@$event->ticket->max_ticket_buy_type == 'unlimited' ? 'checked' : ''); ?>>
                                                            <span class="selectgroup-button"><?php echo e(__('Unlimited')); ?></span>
                                                        </label>

                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="max_ticket_buy_type"
                                                                value="limited" class="selectgroup-input"
                                                                <?php echo e(@$event->ticket->max_ticket_buy_type == 'limited' ? 'checked' : ''); ?>>
                                                            <span class="selectgroup-button"><?php echo e(__('Limited')); ?></span>
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-6 <?php echo e(@$event->ticket->max_ticket_buy_type == 'limited' ? '' : 'd-none'); ?>"
                                                id="max_buy_ticket">
                                                <div class="form-group">
                                                    <label><?php echo e(__('Enter Maximum number of tickets for each customer') . '*'); ?></label>
                                                    <input type="number" name="max_buy_ticket"
                                                        placeholder="Enter Maximum number of tickets for each customer"
                                                        class="form-control"
                                                        value="<?php echo e(@$event->ticket->max_buy_ticket); ?>">
                                                </div>
                                            </div>
                                        <?php else: ?>
                                            <input type="hidden" name="max_ticket_buy_type" value="unlimited">
                                        <?php endif; ?>

                                        <div class="col-lg-6">
                                            <div class="">
                                                <div class="form-group">
                                                    <label for=""><?php echo e(__('Price')); ?>

                                                        (<?php echo e($getCurrencyInfo->base_currency_text); ?>)
                                                        *</label>
                                                    <input type="number" name="price" id="ticket-pricing"
                                                        value="<?php echo e($event->ticket->price); ?>" placeholder="Enter Price"
                                                        class="form-control <?php echo e(optional($event->ticket)->pricing_type == 'free' ? 'd-none' : ''); ?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <input type="checkbox" name="pricing_type"
                                                    <?php echo e(optional($event->ticket)->pricing_type == 'free' ? 'checked' : ''); ?>

                                                    value="free" class="" id="free_ticket"> <label
                                                    for="free_ticket"><?php echo e(__('Tickets are Free')); ?></label>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="">
                                                <div class="form-group">
                                                    <label for=""><?php echo e(__('Meeting Url')); ?>

                                                        *</label>
                                                    <input type="text" name="meeting_url"
                                                        value="<?php echo e($event->meeting_url); ?>" placeholder="Enter Price"
                                                        class="form-control">
                                                </div>
                                            </div>
                                        </div>
                                    </div>



                                    <div class="row <?php echo e(optional($event->ticket)->pricing_type == 'free' ? 'd-none' : ''); ?>"
                                        id="early_bird_discount_free">
                                        <div class="col-lg-12">
                                            <div class="form-group mt-1">
                                                <label for=""><?php echo e(__('Early Bird Discount') . '*'); ?></label>
                                                <div class="selectgroup w-100">
                                                    <label class="selectgroup-item">
                                                        <input type="radio" name="early_bird_discount_type"
                                                            <?php echo e(optional($event->ticket)->early_bird_discount == 'disable' ? 'checked' : ''); ?>

                                                            value="disable" class="selectgroup-input" checked>
                                                        <span class="selectgroup-button"><?php echo e(__('Disable')); ?></span>
                                                    </label>

                                                    <label class="selectgroup-item">
                                                        <input type="radio" name="early_bird_discount_type"
                                                            <?php echo e(optional($event->ticket)->early_bird_discount == 'enable' ? 'checked' : ''); ?>

                                                            value="enable" class="selectgroup-input">
                                                        <span class="selectgroup-button"><?php echo e(__('Enable')); ?></span>
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-12 <?php echo e(optional($event->ticket)->early_bird_discount == 'disable' ? 'd-none' : ''); ?>"
                                            id="early_bird_dicount">
                                            <div class="row">
                                                <div class="col-lg-3">
                                                    <div class="form-group">
                                                        <label for=""><?php echo e(__('Discount')); ?> *</label>
                                                        <select name="discount_type" class="form-control discount_type">
                                                            <option disabled><?php echo e(__('Select Discount Type')); ?></option>
                                                            <option
                                                                <?php echo e(optional($event->ticket)->early_bird_discount_type == 'fixed' ? 'selected' : ''); ?>

                                                                value="fixed"><?php echo e(__('Fixed')); ?></option>
                                                            <option
                                                                <?php echo e(optional($event->ticket)->early_bird_discount_type == 'percentage' ? 'selected' : ''); ?>

                                                                value="percentage"><?php echo e(__('Percentage')); ?></option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="col-lg-3">
                                                    <div class="form-group">
                                                        <label for=""><?php echo e(__('Amount')); ?> *</label>
                                                        <input type="number" name="early_bird_discount_amount"
                                                            value="<?php echo e(optional($event->ticket)->early_bird_discount_amount); ?>"
                                                            class="form-control early_bird_discount_amount">
                                                    </div>
                                                </div>
                                                <div class="col-lg-3">
                                                    <div class="form-group">
                                                        <label for=""><?php echo e(__('Discount End Date')); ?> *</label>
                                                        <input type="date" name="early_bird_discount_date"
                                                            value="<?php echo e(optional($event->ticket)->early_bird_discount_date); ?>"
                                                            class="form-control">
                                                    </div>
                                                </div>
                                                <div class="col-lg-3">
                                                    <div class="form-group">
                                                        <label for=""><?php echo e(__('Discount End Time')); ?> *</label>
                                                        <input type="time" name="early_bird_discount_time"
                                                            value="<?php echo e(optional($event->ticket)->early_bird_discount_time); ?>"
                                                            class="form-control">
                                                    </div>
                                                </div>

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


                                <div id="accordion" class="mt-3">
                                    <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <div class="version">
                                            <div class="version-header" id="heading<?php echo e($language->id); ?>">
                                                <h5 class="mb-0">
                                                    <button type="button" class="btn btn-link" data-toggle="collapse"
                                                        data-target="#collapse<?php echo e($language->id); ?>"
                                                        aria-expanded="<?php echo e($language->is_default == 1 ? 'true' : 'false'); ?>"
                                                        aria-controls="collapse<?php echo e($language->id); ?>">
                                                        <?php echo e($language->name . __(' Language')); ?>

                                                        <?php echo e($language->is_default == 1 ? '(Default)' : ''); ?>

                                                    </button>
                                                </h5>
                                            </div>
                                            <?php
                                                $event_content = DB::table('event_contents')
                                                    ->where('language_id', $language->id)
                                                    ->where('event_id', $event->id)
                                                    ->first();
                                            ?>
                                            <div id="collapse<?php echo e($language->id); ?>"
                                                class="collapse <?php echo e($language->is_default == 1 ? 'show' : ''); ?>"
                                                aria-labelledby="heading<?php echo e($language->id); ?>" data-parent="#accordion">
                                                <div class="version-body">
                                                    <div class="row">
                                                        <div class="col-lg-6">
                                                            <div
                                                                class="form-group <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>">
                                                                <label><?php echo e(__('Event Title') . '*'); ?></label>
                                                                <input type="text" class="form-control"
                                                                    name="<?php echo e($language->code); ?>_title"
                                                                    value="<?php echo e(@$event_content->title); ?>"
                                                                    placeholder="Enter Event Name">
                                                            </div>
                                                        </div>

                                                        <div class="col-lg-6">
                                                            <div
                                                                class="form-group <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>">
                                                                <?php
                                                                    $categories = DB::table('event_categories')
                                                                        ->where('language_id', $language->id)
                                                                        ->where('status', 1)
                                                                        ->orderBy('serial_number', 'asc')
                                                                        ->get();
                                                                ?>

                                                                <label for=""><?php echo e(__('Category') . '*'); ?></label>
                                                                <select name="<?php echo e($language->code); ?>_category_id"
                                                                    class="form-control">
                                                                    <option selected disabled><?php echo e(__('Select Category')); ?>

                                                                    </option>

                                                                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <option value="<?php echo e($category->id); ?>"
                                                                            <?php echo e(@$event_content->event_category_id == $category->id ? 'selected' : ''); ?>>
                                                                            <?php echo e($category->name); ?></option>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <?php if($event->event_type == 'venue'): ?>
                                                        <div class="row">
                                                            <div class="col-lg-12">
                                                                <div class="form-group">
                                                                    <label
                                                                        for=""><?php echo e(__('Address') . '*'); ?></label>
                                                                    <input type="text"
                                                                        name="<?php echo e($language->code); ?>_address"
                                                                        class="form-control <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>"
                                                                        placeholder="Enter Address"
                                                                        id="search-address_<?php echo e($language->code); ?>"
                                                                        value="<?php echo e(@$event_content->address); ?>">
                                                                    <?php if($language->is_default == 1 && $settings->google_map_status == 1): ?>
                                                                        <a href=""
                                                                            class="btn btn-secondary mt-2 btn-sm"
                                                                            data-toggle="modal"
                                                                            data-target="#GoogleMapModal">
                                                                            <i class="fas fa-eye"></i>
                                                                            <?php echo e(__('Show Map')); ?>

                                                                        </a>
                                                                    <?php endif; ?>
                                                                </div>
                                                            </div>
                                                            <!-- latitude and longitude -->

                                                            <?php if($language->is_default == 1): ?>
                                                            <div
                                                                class="col-lg-4">
                                                                <div class="form-group">
                                                                    <label for=""><?php echo e(__('Latitude')); ?></label>
                                                                    <input type="text" name="latitude"
                                                                        value="<?php echo e(@$event->latitude); ?>"
                                                                        placeholder="Latitude"
                                                                        class="form-control latitude">
                                                                </div>
                                                            </div>
                                                            <div
                                                                class="col-lg-4">
                                                                <div class="form-group">
                                                                    <label for=""><?php echo e(__('Longitude')); ?></label>
                                                                    <input type="text" placeholder="Longitude"
                                                                        value="<?php echo e(@$event->longitude); ?>"
                                                                        name="longitude" class="form-control longitude">
                                                                </div>
                                                            </div>
                                                            <?php endif; ?>

                                                            <?php if($settings->event_country_status == 1): ?>
                                                                <?php
                                                                    $country = \DB::table('event_countries')
                                                                        ->where([
                                                                            ['language_id', $language->id],
                                                                            ['status', 1],
                                                                            ['id', $event_content->country_id],
                                                                        ])
                                                                        ->select('id', 'name')
                                                                        ->first();
                                                                ?>
                                                                <div class="col-lg-4">
                                                                    <div class="form-group">
                                                                        <label
                                                                            for=""><?php echo e(__('County') . '*'); ?></label>
                                                                        <select name="<?php echo e($language->code); ?>_country"
                                                                            data-lang="<?php echo e($language->id); ?>"
                                                                            class="form-control countryDropdown country_select">
                                                                            <?php if(!is_null($country)): ?>
                                                                                <option selected
                                                                                    value="<?php echo e($country->id); ?>">
                                                                                    <?php echo e($country->name); ?></option>
                                                                            <?php else: ?>
                                                                                <option selected disabled>
                                                                                    <?php echo e(__('Select County')); ?></option>
                                                                            <?php endif; ?>
                                                                        </select>
                                                                    </div>
                                                                </div>
                                                            <?php endif; ?>
                                                            <?php if($settings->event_state_status == 1): ?>
                                                                <?php
                                                                    $state = \DB::table('event_states')
                                                                        ->where([
                                                                            ['language_id', $language->id],
                                                                            ['status', 1],
                                                                            ['id', $event_content->state_id],
                                                                        ])
                                                                        ->select('id', 'name')
                                                                        ->first();
                                                                    $none = 'none';
                                                                ?>
                                                                <div class="col-lg-4 state_div"
                                                                    style="display: <?php echo e($settings->event_country_status == 0 || @$event_content->state_id ? '' : $none); ?>">
                                                                    <div class="form-group">
                                                                        <label for=""><?php echo e(__('State')); ?></label>
                                                                        <select name="<?php echo e($language->code); ?>_state"
                                                                            data-lang="<?php echo e($language->id); ?>"
                                                                            class="form-control stateDropdown state_select">
                                                                            <?php if(!is_null($state)): ?>
                                                                                <option selected
                                                                                    value="<?php echo e($state->id); ?>">
                                                                                    <?php echo e($state->name); ?></option>
                                                                            <?php else: ?>
                                                                                <option selected disabled>
                                                                                    <?php echo e(__('Select County')); ?></option>
                                                                            <?php endif; ?>
                                                                        </select>
                                                                    </div>
                                                                </div>
                                                            <?php endif; ?>

                                                            <?php
                                                                $city = \DB::table('event_cities')
                                                                    ->where([
                                                                        ['language_id', $language->id],
                                                                        ['status', 1],
                                                                        ['id', $event_content->city_id],
                                                                    ])
                                                                    ->select('id', 'name')
                                                                    ->first();
                                                            ?>
                                                            <div class="col-lg-4">
                                                                <div class="form-group">
                                                                    <label for=""><?php echo e(__('City') . '*'); ?></label>
                                                                    <select name="<?php echo e($language->code); ?>_city"
                                                                        data-lang="<?php echo e($language->id); ?>"
                                                                        class="form-control cityDropdown city_select">
                                                                        <?php if(!is_null($city)): ?>
                                                                            <option selected value="<?php echo e($city->id); ?>">
                                                                                <?php echo e($city->name); ?></option>
                                                                        <?php else: ?>
                                                                            <option selected disabled>
                                                                                <?php echo e(__('Select County')); ?></option>
                                                                        <?php endif; ?>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                            <div class="col-lg-4">
                                                                <div class="form-group">
                                                                    <label
                                                                        for=""><?php echo e(__('Zip/Post Code ')); ?></label>
                                                                    <input type="text"
                                                                        placeholder="Enter Zip/Post Code"
                                                                        name="<?php echo e($language->code); ?>_zip_code"
                                                                        class="form-control <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>"
                                                                        value="<?php echo e(@$event_content->zip_code); ?>">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    <?php endif; ?>

                                                    <div class="row">
                                                        <div class="col">
                                                            <div
                                                                class="form-group <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>">
                                                                <label><?php echo e(__('Description') . '*'); ?></label>
                                                                <textarea id="descriptionTmce<?php echo e($language->id); ?>" class="form-control summernote"
                                                                    name="<?php echo e($language->code); ?>_description" placeholder="Enter Event Description" data-height="300"><?php echo @$event_content->description; ?></textarea>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-lg-12">
                                                            <div
                                                                class="form-group <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>">
                                                                <label><?php echo e(__('Refund Policy')); ?> *</label>
                                                                <textarea class="form-control" name="<?php echo e($language->code); ?>_refund_policy" rows="5"
                                                                    placeholder="Enter Refund Policy"><?php echo e(@$event_content->refund_policy); ?></textarea>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-lg-12">
                                                            <div
                                                                class="form-group <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>">
                                                                <label><?php echo e(__('Event Meta Keywords')); ?></label>
                                                                <input class="form-control"
                                                                    name="<?php echo e($language->code); ?>_meta_keywords"
                                                                    value="<?php echo e(@$event_content->meta_keywords); ?>"
                                                                    placeholder="Enter Meta Keywords"
                                                                    data-role="tagsinput">
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-lg-12">
                                                            <div
                                                                class="form-group <?php echo e($language->direction == 1 ? 'rtl text-right' : ''); ?>">
                                                                <label><?php echo e(__('Event Meta Description')); ?></label>
                                                                <textarea class="form-control" name="<?php echo e($language->code); ?>_meta_description" rows="5"
                                                                    placeholder="Enter Meta Description"><?php echo e(@$event_content->meta_description); ?></textarea>
                                                            </div>
                                                        </div>
                                                    </div>



                                                    <div class="row">
                                                        <div class="col">
                                                            <?php $currLang = $language; ?>

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

                                                                <div class="form-check py-0">
                                                                    <label class="form-check-label">
                                                                        <input class="form-check-input" type="checkbox"
                                                                            onchange="cloneInput('collapse<?php echo e($currLang->id); ?>', 'collapse<?php echo e($language->id); ?>', event)">
                                                                        <span
                                                                            class="form-check-sign"><?php echo e(__('Clone for')); ?>

                                                                            <strong
                                                                                class="text-capitalize text-secondary"><?php echo e($language->name); ?></strong>
                                                                            <?php echo e(__('language')); ?></span>
                                                                    </label>
                                                                </div>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </div>

                                <div id="sliders"></div>
                            </form>
                        </div>
                    </div>
                </div>

                <div class="card-footer">
                    <div class="row">
                        <div class="col-12 text-center">
                            <button type="submit" id="EventSubmit" class="btn btn-primary">
                                <?php echo e(__('Update')); ?>

                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php if($settings->google_map_status == 1): ?>
        <?php if ($__env->exists('backend.event.map-modal')) echo $__env->make('backend.event.map-modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
    <?php if($settings->google_map_status == 1): ?>
        <script
            src="https://maps.googleapis.com/maps/api/js?key=<?php echo e($settings->google_map_api_key); ?>&libraries=places&callback=initMap"
            async defer></script>
        <script src="<?php echo e(asset('assets/admin/js/edit-map-init.js')); ?>"></script>
    <?php endif; ?>
    <script type="text/javascript" src="<?php echo e(asset('assets/admin/js/admin-partial.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/js/admin_dropzone.js')); ?>"></script>
    <script>
        $(document).ready(function() {
            $('.js-example-basic-single').select2();
        });
    </script>
    <script src="<?php echo e(asset('assets/admin/js/event_specification.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('variables'); ?>
    <?php
        $haveCoSt = $settings->event_country_status == 1 && $settings->event_state_status == 1 ? 1 : 0;
        $languages = App\Models\Language::get();
    ?>
    <script>
        "use strict";
        let languages = "<?php echo e($languages); ?>";
        var storeUrl = "<?php echo e(route('admin.event.imagesstore')); ?>";
        var removeUrl = "<?php echo e(route('admin.event.imagermv')); ?>";

        var rmvdbUrl = "<?php echo e(route('admin.event.imgdbrmv')); ?>";
        var loadImgs = "<?php echo e(route('admin.event.images', $event->id)); ?>";
        var defaultLang = "<?php echo e($defaultLang->code); ?>";

        const haveCoSt = <?php echo e($haveCoSt); ?>;
        const isActiveState = <?php echo e($settings->event_state_status == 1 ? 1 : 0); ?>;
        const getStateUrl = "<?php echo e(route('get.city.state')); ?>";
        const getCityUrl = "<?php echo e(route('get.cities.state')); ?>";
    </script>
    <?php if($settings->google_map_status == 1): ?>
        <script>
            var address = "<?php echo e(@$event_address->address); ?>";
        </script>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ysakkarj/events.theend.africa/resources/views/backend/event/edit.blade.php ENDPATH**/ ?>