<?php $__env->startSection('title',trans('layout.settings_title')); ?>
<?php $__env->startSection('css'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('vendor/select2/css/select2.min.css')); ?>">
    <style>
        .custom-nav.active {
            color: #2f4cdd !important;
            box-shadow: none !important;
        }

        .nav-flex {
            display: flex;
            flex-direction: column;
        }

        .flex-content {
            width: fit-content;
        }
    </style>
<?php $__env->stopSection(); ?>

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

    <div class="col-xl-12">
        <div class="card">
            <div class="card-body">
                <!-- Nav tabs -->
                <div class="custom-tab-1">
                    <ul class="nav nav-tabs">
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('general_setting')): ?>
                            <li class="nav-item">
                                <a class="nav-link active" data-toggle="tab"
                                   href="#generalSettings"><?php echo e(trans('layout.general')); ?></a>
                            </li>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('email_setting')): ?>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab"
                                   href="#emailSettings"><?php echo e(trans('layout.email_settings')); ?></a>
                            </li>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('email_template_setting')): ?>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab"
                                   href="#emailTemplate"><?php echo e(trans('layout.email_template')); ?></a>
                            </li>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('payment_gateway_setting')): ?>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab"
                                   href="#paymentGateway"><?php echo e(trans('layout.payment_gateway')); ?></a>
                            </li>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('role_permission')): ?>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab"
                                   href="#rolePermission"><?php echo e(trans('layout.role_permission')); ?></a>
                            </li>
                        <?php endif; ?>
                        <?php if(auth()->user()->type=='admin'): ?>
                            <li class="nav-item">
                                <a class="nav-link" target="_blank"
                                   href="<?php echo e(url('translations')); ?>"><?php echo e(trans('layout.translation')); ?></a>
                            </li>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('sms_gateway_setting')): ?>
                            <li class="nav-item d-none">
                                <a class="nav-link" data-toggle="tab"
                                   href="#smsGateway"><?php echo e(trans('layout.sms_gateway')); ?></a>
                            </li>
                        <?php endif; ?>
                    </ul>
                    <div class="tab-content">

                        <div class="tab-pane fade show active" id="generalSettings" role="tabpanel">
                            <div class="pt-4">
                                <div class="card">
                                    <div class="card-body">
                                        <div class="row">
                                            <div class="col-sm-4">
                                                <div class="nav nav-pills mb-3 nav-flex">
                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('general_setting')): ?>
                                                        <a href="#v-pills-generalSettings" data-toggle="pill"
                                                           class="nav-link active show custom-nav flex-content"><?php echo e(trans('layout.general_settings')); ?></a>
                                                    <?php endif; ?>
                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('change_password')): ?>
                                                        <a href="#v-pills-passwordChange" data-toggle="pill"
                                                           class="nav-link custom-nav flex-content"><?php echo e(trans('layout.password_change')); ?></a>
                                                    <?php endif; ?>
                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('site_setting')): ?>
                                                        <a href="#v-pills-siteSettings" data-toggle="pill"
                                                           class="nav-link custom-nav flex-content"><?php echo e(trans('layout.site_settings')); ?></a>
                                                    <?php endif; ?>
                                                        <?php if(auth()->user()->type=='admin'): ?>
                                                            <a href="#v-pills-orderSettings" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('Order Settings')); ?></a>
                                                        <?php endif; ?>

                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('local_setting')): ?>
                                                        <a href="#v-pills-localSettings" data-toggle="pill"
                                                           class="nav-link custom-nav flex-content"><?php echo e(trans('layout.local_settings')); ?></a>
                                                    <?php endif; ?>

                                                </div>
                                            </div>
                                            <div class="col-sm-8">
                                                <div class="tab-content">
                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('general_setting')): ?>
                                                        <div id="v-pills-generalSettings"
                                                             class="tab-pane fade active show">
                                                            <form role="form" action="<?php echo e(route('general')); ?>"
                                                                  method="post"
                                                                  enctype="multipart/form-data">
                                                                <?php echo csrf_field(); ?>
                                                                <div class="form-group">
                                                                    <label
                                                                        for="exampleInputEmail1"><?php echo e(trans('layout.name')); ?></label>
                                                                    <input type="text" name="name"
                                                                           value="<?php echo e(isset($admin->name)?$admin->name:''); ?>"
                                                                           class="form-control"
                                                                           placeholder="<?php echo e(trans('layout.name')); ?>">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label
                                                                        for="exampleInputEmail1"><?php echo e(trans('layout.phone_number')); ?></label>
                                                                    <input type="tel" name="phone_number"
                                                                           value="<?php echo e(isset($admin->phone_number)?$admin->phone_number:''); ?>"
                                                                           class="form-control"
                                                                           placeholder="<?php echo e(trans('layout.phone_number')); ?>">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label
                                                                        for="exampleInputEmail1"><?php echo e(trans('layout.email')); ?></label>
                                                                    <input type="email" name="email"
                                                                           value="<?php echo e(isset($admin->email)?$admin->email:''); ?>"
                                                                           class="form-control"
                                                                           id="exampleInputEmail1"
                                                                           placeholder="<?php echo e(trans('layout.email')); ?>">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label><?php echo e(trans('layout.picture')); ?></label>
                                                                    <div class="input-group">
                                                                        <div class="form-control">
                                                                            <input type="file" name="picture"
                                                                                   value="<?php echo e(isset($admin->picture)?$admin->picture:''); ?>">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <button type="submit"
                                                                        class="btn btn-primary float-right"><?php echo e(trans('layout.submit')); ?></button>
                                                            </form>
                                                        </div>
                                                    <?php endif; ?>
                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('change_password')): ?>
                                                        <div id="v-pills-passwordChange"
                                                             class="tab-pane fade">
                                                            <form role="form" action="<?php echo e(route('password.update')); ?>"
                                                                  method="post">
                                                                <?php echo csrf_field(); ?>
                                                                <div class="form-group">
                                                                    <label><?php echo e(trans('layout.old_password')); ?></label>
                                                                    <input type="password" name="old_password"
                                                                           class="form-control"
                                                                           placeholder="<?php echo e(trans('layout.password')); ?>">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label
                                                                        for="exampleInputPassword1"><?php echo e(trans('layout.new_password')); ?></label>
                                                                    <input type="password" name="new_password"
                                                                           class="form-control"
                                                                           placeholder="<?php echo e(trans('layout.password')); ?>">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label
                                                                        for="exampleInputPassword1"><?php echo e(trans('layout.password')); ?></label>
                                                                    <input type="password" name="confirm_password"
                                                                           class="form-control"
                                                                           placeholder=" Confirm Password">
                                                                </div>
                                                                <button type="submit"
                                                                        class="btn btn-primary float-right"><?php echo e(trans('layout.submit')); ?></button>
                                                            </form>
                                                        </div>
                                                    <?php endif; ?>
                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('site_setting')): ?>
                                                        <div id="v-pills-siteSettings"
                                                             class="tab-pane fade">
                                                            <form action="<?php echo e(route('side.bar.settings')); ?>" method="post"
                                                                  enctype="multipart/form-data">
                                                                <?php echo csrf_field(); ?>

                                                                <?php if(isset($site_setting_id)): ?>
                                                                    <input type="hidden" name="settings_id"
                                                                           value="<?php echo e($site_setting_id); ?>">
                                                                <?php endif; ?>
                                                                <div class="form-group">
                                                                    <label><?php echo e(trans('layout.name')); ?> </label>

                                                                    <input
                                                                        value="<?php echo e(isset($site_setting->name)?$site_setting->name:''); ?>"
                                                                        class="form-control" type="text"
                                                                        name="name">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label>Fav Icon </label>
                                                                    <?php if(isset($site_setting->favicon)): ?>
                                                                        <img class="height-30"
                                                                             src="<?php echo e(asset('uploads/'.$site_setting->favicon)); ?>"
                                                                             alt="">
                                                                    <?php endif; ?>
                                                                    <input class="form-control"
                                                                           type="file" name="fav_icon">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label>Logo</label>
                                                                    <?php if(isset($site_setting->logo)): ?>
                                                                        <img class="height-30"
                                                                             src="<?php echo e(asset('uploads/'.$site_setting->logo)); ?>"
                                                                             alt="">
                                                                    <?php endif; ?>
                                                                    <input class="form-control"
                                                                           type="file"
                                                                           name="logo">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label>Live Notification</label>
                                                                    <select class="form-control"
                                                                            name="live_notification"
                                                                            id="live_notification">
                                                                        <option
                                                                            <?php echo e(isset($site_setting->live_notification) && $site_setting->live_notification=='enable'?'selected':''); ?> value="enable"><?php echo e(trans('layout.enable')); ?></option>
                                                                        <option
                                                                            <?php echo e(isset($site_setting->live_notification) && $site_setting->live_notification=='disable'?'selected':''); ?> value="disable"><?php echo e(trans('layout.disable')); ?></option>
                                                                    </select>
                                                                </div>

                                                                <button type="submit"
                                                                        class="btn btn-primary"><?php echo e(trans('layout.submit')); ?></button>

                                                            </form>
                                                        </div>
                                                    <?php endif; ?>
                                                    <div id="v-pills-orderSettings"
                                                         class="tab-pane fade">
                                                        <form action="<?php echo e(route('order.status.settings')); ?>" method="post"
                                                              enctype="multipart/form-data">
                                                            <?php echo csrf_field(); ?>

                                                            <?php if(isset($order_setting_id)): ?>
                                                                <input type="hidden" name="settings_id"
                                                                       value="<?php echo e($order_setting_id); ?>">
                                                            <?php endif; ?>
                                                            <div
                                                                class="form-group <?php echo e(auth()->user()->type=='admin'?'d-block':'d-none'); ?>">
                                                                <label><?php echo e(trans('Place Order')); ?></label>
                                                                <select class="form-control"
                                                                        name="admin_order_status">
                                                                    <option
                                                                        <?php echo e(isset($order_setting->admin_order_status) && $order_setting->admin_order_status=='enable'?'selected':''); ?> value="enable"><?php echo e(trans('layout.enable')); ?></option>
                                                                    <option
                                                                        <?php echo e(isset($order_setting->admin_order_status) && $order_setting->admin_order_status=='disable'?'selected':''); ?> value="disable"><?php echo e(trans('layout.disable')); ?></option>
                                                                </select>
                                                            </div>
                                                                <button type="submit"
                                                                        class="btn btn-primary"><?php echo e(trans('layout.submit')); ?></button>



                                                        </form>
                                                    </div>

                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('local_setting')): ?>
                                                        <div id="v-pills-localSettings"
                                                             class="tab-pane fade">
                                                            <form action="<?php echo e(route('settings.local')); ?>" method="post">
                                                                <?php echo csrf_field(); ?>

                                                                <?php if(isset($local_setting_id)): ?>
                                                                    <input type="hidden" name="local_setting_id"
                                                                           value="<?php echo e($local_setting_id); ?>">
                                                                <?php endif; ?>
                                                                <div class="form-group">
                                                                    <div class="row">
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.language')); ?> </label>
                                                                            <select name="language"
                                                                                    class="form-control">
                                                                                <?php $__currentLoopData = $all_locales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $locale): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                                    <option
                                                                                        <?php echo e(isset($local_setting->language) && $local_setting->language==$locale?'selected':''); ?> value="<?php echo e($locale); ?>"><?php echo e($locale); ?></option>
                                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                            </select>
                                                                        </div>
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.direction')); ?> </label>
                                                                            <select name="direction"
                                                                                    class="form-control">
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->direction) && $local_setting->direction=='ltr'?'selected':''); ?> value="ltr">
                                                                                    LTR
                                                                                </option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->direction) && $local_setting->direction=='rtl'?'selected':''); ?> value="rtl">
                                                                                    RTL
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </div>

                                                                </div>
                                                                <div class="form-group">
                                                                    <div class="row">
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.date_time_format')); ?> </label>

                                                                            <select name="date_time_format"
                                                                                    class="form-control">
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_format) && $local_setting->date_time_format=='d m Y'?'selected':''); ?> value="d m Y"><?php echo e(trans('30 12 2021')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_format) && $local_setting->date_time_format=='m d Y'?'selected':''); ?> value="m d Y"><?php echo e(trans('12 30 2021')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_format) && $local_setting->date_time_format=='Y d m'?'selected':''); ?> value="Y d m"><?php echo e(trans('2021 30 12')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_format) && $local_setting->date_time_format=='Y m d'?'selected':''); ?> value="Y m d"><?php echo e(trans('2021 12 30')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_format) && $local_setting->date_time_format=='d_M,Y'?'selected':''); ?>  value="d_M,Y"><?php echo e(trans('17 July,2021')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_format) && $local_setting->date_time_format=='M_d,Y'?'selected':''); ?>  value="M_d,Y"><?php echo e(trans('July 17,2021')); ?></option>
                                                                            </select>
                                                                        </div>
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.date_time_separator')); ?> </label>

                                                                            <select name="date_time_separator"
                                                                                    class="form-control">
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_separator) && $local_setting->date_time_separator=='-'?'selected':''); ?> value="-"><?php echo e(trans('-')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->date_time_separator) && $local_setting->date_time_separator=='/'?'selected':''); ?> value="/"><?php echo e(trans('/')); ?></option>
                                                                            </select>
                                                                        </div>
                                                                    </div>

                                                                </div>
                                                                <div class="form-group">
                                                                    <div class="row">
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.timezone')); ?> </label>

                                                                            <select id="timezone" name="timezone"
                                                                                    class="form-control">

                                                                                <?php $__currentLoopData = getAllTimeZones(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $time): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                                    <option
                                                                                        <?php echo e(isset($local_setting->timezone) && $local_setting->timezone==$time['zone']?'selected':''); ?> value="<?php echo e($time['zone']); ?>">
                                                                                        (<?php echo e($time['GMT_difference']. ' ) '.$time['zone']); ?></option>
                                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                            </select>
                                                                        </div>
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.decimal_point')); ?> </label>
                                                                            <select name="decimal_format"
                                                                                    class="form-control">
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->decimal_format) && $local_setting->decimal_format==','?'selected':''); ?> value=","><?php echo e(trans('Comma (,)')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->decimal_format) && $local_setting->decimal_format=='.'?'selected':''); ?> value="."><?php echo e(trans('Dot (.)')); ?></option>
                                                                            </select>
                                                                        </div>
                                                                    </div>

                                                                </div>
                                                                <div class="form-group">
                                                                    <div class="row">
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.currency_symbol')); ?> </label>

                                                                            <input
                                                                                value="<?php echo e(isset($local_setting->currency_symbol) ?$local_setting->currency_symbol:''); ?>"
                                                                                class="form-control" type="text"
                                                                                name="currency_symbol">

                                                                        </div>
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.currency_code')); ?> </label>

                                                                            <input
                                                                                value="<?php echo e(isset($local_setting->currency_code) ?$local_setting->currency_code:''); ?>"
                                                                                class="form-control" type="text"
                                                                                name="currency_code"
                                                                                placeholder="Ex: usd or eur">
                                                                            <a target="_blank" class="pull-right"
                                                                               href="https://www.iban.com/currency-codes"><?php echo e(trans('layout.find_yours')); ?></a>

                                                                        </div>

                                                                        <div class="col-12">
                                                                            <label><?php echo e(trans('layout.currency_symbol_position')); ?> </label>
                                                                            <select name="currency_symbol_position"
                                                                                    class="form-control">
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->currency_symbol_position) && $local_setting->currency_symbol_position=='before'?'selected':''); ?> value="before"><?php echo e(trans('layout.before')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->currency_symbol_position) && $local_setting->currency_symbol_position=='after'?'selected':''); ?> value="after"><?php echo e(trans('layout.after')); ?></option>
                                                                            </select>
                                                                        </div>

                                                                    </div>

                                                                </div>
                                                                <div class="form-group">
                                                                    <div class="row">
                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.decimals')); ?> </label>

                                                                            <input
                                                                                value="<?php echo e(isset($local_setting->decimals) ?$local_setting->decimals:'0'); ?>"
                                                                                class="form-control" type="number"
                                                                                name="decimals">

                                                                        </div>

                                                                        <div class="col-6">
                                                                            <label><?php echo e(trans('layout.thousand_separator')); ?> </label>
                                                                            <select name="thousand_separator"
                                                                                    class="form-control">
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->thousand_separator) && $local_setting->thousand_separator==','?'selected':''); ?> value=","><?php echo e(trans('Comma (,)')); ?></option>
                                                                                <option
                                                                                    <?php echo e(isset($local_setting->thousand_separator) && $local_setting->thousand_separator=='.'?'selected':''); ?> value="."><?php echo e(trans('Dot (.)')); ?></option>
                                                                            </select>
                                                                        </div>

                                                                    </div>

                                                                </div>
                                                                <button type="submit"
                                                                        class="btn btn-sm btn-primary"><?php echo e(trans('layout.submit')); ?></button>

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

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

                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('email_setting')): ?>
                            <div class="tab-pane fade" id="emailSettings">
                                <div class="pt-4">
                                    <div class="card">
                                        <form role="form" action="<?php echo e(route('email.settings')); ?>" method="post">
                                            <?php echo csrf_field(); ?>
                                            <div class="card-body">

                                                <?php if(isset($email_setting_id)): ?>
                                                    <input type="hidden" name="setting_id"
                                                           value="<?php echo e($email_setting_id); ?>">
                                                <?php endif; ?>
                                                <div class="row">
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label
                                                                for="exampleInputPassword1"><?php echo e(trans('layout.name')); ?></label>
                                                            <input
                                                                value="<?php echo e(isset($email_setting->name)?$email_setting->name:''); ?>"
                                                                type="text" name="name" class="form-control"
                                                                placeholder="<?php echo e(trans('layout.name')); ?>">
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label
                                                                for="exampleInputPassword1"><?php echo e(trans('layout.email_from')); ?></label>
                                                            <input
                                                                value="<?php echo e(isset($email_setting->email_from)?$email_setting->email_from:''); ?>"
                                                                type="text" name="email_from" class="form-control"
                                                                placeholder="<?php echo e(trans('layout.email')); ?>">
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label
                                                                for="exampleInputPassword1"><?php echo e(trans('layout.username')); ?></label>
                                                            <input
                                                                value="<?php echo e(isset($email_setting->username)?$email_setting->username:''); ?>"
                                                                type="text" name="username" class="form-control"
                                                                placeholder="<?php echo e(trans('layout.username')); ?>">
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label
                                                                for="exampleInputPassword1"><?php echo e(trans('layout.password')); ?></label>
                                                            <input
                                                                value="<?php echo e(isset($email_setting->password)?$email_setting->password:''); ?>"
                                                                type="password" name="password" class="form-control"
                                                                placeholder=" Password">
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label
                                                                for="exampleInputPassword1"><?php echo e(trans('layout.host')); ?></label>
                                                            <input
                                                                value="<?php echo e(isset($email_setting->host)?$email_setting->host:''); ?>"
                                                                type="text" name="host" class="form-control"
                                                                placeholder="<?php echo e(trans('layout.host')); ?>">
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label
                                                                for="exampleInputPassword1"><?php echo e(trans('layout.port')); ?></label>
                                                            <input
                                                                value="<?php echo e(isset($email_setting->port)?$email_setting->port:''); ?>"
                                                                type="text" name="port" class="form-control"
                                                                placeholder="<?php echo e(trans('layout.port')); ?>">
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label
                                                                for="exampleInputPassword1"><?php echo e(trans('layout.encrypt_type')); ?></label>
                                                            <select name="encryption_type" class="form-control">
                                                                <option
                                                                    <?php echo e(isset($email_setting->encryption_type) && $email_setting->encryption_type=='tls'?'selected':''); ?> value="tls">
                                                                    tls
                                                                </option>
                                                                <option
                                                                    <?php echo e(isset($email_setting->encryption_type) && $email_setting->encryption_type=='ssl'?'selected':''); ?> value="ssl">
                                                                    ssl
                                                                </option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="card-footer text-right">
                                                <button type="submit"
                                                        class="btn btn-sm btn-primary"><?php echo e(trans('layout.submit')); ?></button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('email_template_setting')): ?>
                            <div class="tab-pane fade" id="emailTemplate">
                                <div class="pt-4">
                                    <div class="col-xl-12">
                                        <div class="card">
                                            <div class="card-body">
                                                <div class="row">
                                                    <div class="col-xl-4">
                                                        <div class="nav nav-pills mb-3 nav-flex">
                                                            <a href="#v-pills-registration" data-toggle="pill"
                                                               class="nav-link active show custom-nav flex-content"><?php echo e(trans('layout.registration')); ?></a>
                                                            <a href="#v-pills-forgetPass" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.forget_password')); ?></a>
                                                            <a href="#v-pills-orderPlaced" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.order_placed')); ?></a>
                                                            <a href="#v-pills-orderStatus" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.order_status')); ?></a>
                                                            <a href="#v-pills-planRequest" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.plan_request')); ?></a>
                                                            <a href="#v-pills-planAccepted" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.plan_accept')); ?></a>
                                                            <a href="#v-pills-planExpire" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.plan_expire')); ?></a>
                                                        </div>
                                                    </div>
                                                    <div class="col-xl-8">
                                                        <div class="tab-content">
                                                            <div id="v-pills-registration"
                                                                 class="tab-pane fade active show">
                                                                <form action="<?php echo e(route('email.template.store')); ?>"
                                                                      method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($emailTemplateReg)): ?>
                                                                        <input type="hidden"
                                                                               value="<?php echo e($emailTemplateReg->id); ?>"
                                                                               name="emailTemplateID">
                                                                    <?php endif; ?>
                                                                    <input type="hidden" name="type"
                                                                           value="<?php echo e(isset($emailTemplateReg->type)?$emailTemplateReg->type:'registration'); ?>">
                                                                    <textarea class="form-control" name="subject"
                                                                              rows="2"
                                                                              placeholder="<?php echo e(trans('layout.email_subject')); ?>"><?php echo e(isset($emailTemplateReg->subject)?$emailTemplateReg->subject:''); ?></textarea>
                                                                    <textarea class="form-control mt-2" name="body"

                                                                              rows="5"
                                                                              placeholder="<?php echo e(trans('layout.email_body')); ?>"><?php echo e(isset($emailTemplateReg->body)?$emailTemplateReg->body:''); ?></textarea>

                                                                    <div>{customer_name} = Customer Name</div>
                                                                    <div>{click_here} = For verification link</div>
                                                                    <button type="submit"
                                                                            class="btn btn-primary float-right mt-4">
                                                                        <?php echo e(trans('layout.submit')); ?>

                                                                    </button>
                                                                </form>
                                                            </div>
                                                            <div id="v-pills-forgetPass" class="tab-pane fade">
                                                                <form action="<?php echo e(route('email.template.store')); ?>"
                                                                      method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($emailTemplatePass)): ?>
                                                                        <input type="hidden"
                                                                               value="<?php echo e($emailTemplatePass->id); ?>"
                                                                               name="emailTemplateID">
                                                                    <?php endif; ?>
                                                                    <input type="hidden" name="type"
                                                                           value="<?php echo e(isset($emailTemplatePass->type)?$emailTemplatePass->type:'forget_password'); ?>">
                                                                    <textarea class="form-control" name="subject"
                                                                              rows="2"
                                                                              placeholder="<?php echo e(trans('layout.email_subject')); ?>"><?php echo e(isset($emailTemplatePass->subject)?$emailTemplatePass->subject:''); ?></textarea>
                                                                    <textarea class="form-control mt-2" name="body"

                                                                              rows="5"
                                                                              placeholder="<?php echo e(trans('layout.email_body')); ?>"><?php echo e(isset($emailTemplatePass->body)?$emailTemplatePass->body:''); ?></textarea>
                                                                    <div>{customer_name} = Customer Name</div>
                                                                    <div>{reset_url} = Reset URL Link</div>
                                                                    <button type="submit"
                                                                            class="btn btn-primary float-right mt-4">
                                                                        <?php echo e(trans('layout.submit')); ?>

                                                                    </button>
                                                                </form>
                                                            </div>
                                                            <div id="v-pills-orderPlaced" class="tab-pane fade">
                                                                <form action="<?php echo e(route('email.template.store')); ?>"
                                                                      method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($emailTemplateOrderPlaced)): ?>
                                                                        <input type="hidden"
                                                                               value="<?php echo e($emailTemplateOrderPlaced->id); ?>"
                                                                               name="emailTemplateID">
                                                                    <?php endif; ?>
                                                                    <input type="hidden" name="type"
                                                                           value="<?php echo e(isset($emailTemplateOrderPlaced->type)?$emailTemplateOrderPlaced->type:'order_placed'); ?>">
                                                                    <textarea class="form-control" name="subject"
                                                                              rows="2"
                                                                              placeholder="<?php echo e(trans('layout.email_subject')); ?>"><?php echo e(isset($emailTemplateOrderPlaced->subject)?$emailTemplateOrderPlaced->subject:''); ?></textarea>
                                                                    <textarea class="form-control mt-2" name="body"

                                                                              rows="5"
                                                                              placeholder="<?php echo e(trans('layout.email_body')); ?>"><?php echo e(isset($emailTemplateOrderPlaced->body)?$emailTemplateOrderPlaced->body:''); ?></textarea>

                                                                    <div>{customer_name} = Customer Name</div>
                                                                    <div>{order_no} = Order No</div>
                                                                    <div>{total_amount} = Total Amount</div>
                                                                    <button type="submit"
                                                                            class="btn btn-primary float-right mt-4">
                                                                        <?php echo e(trans('layout.submit')); ?>

                                                                    </button>
                                                                </form>
                                                            </div>
                                                            <div id="v-pills-orderStatus" class="tab-pane fade">
                                                                <form action="<?php echo e(route('email.template.store')); ?>"
                                                                      method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($emailTemplateOrderStatus)): ?>
                                                                        <input type="hidden"
                                                                               value="<?php echo e($emailTemplateOrderStatus->id); ?>"
                                                                               name="emailTemplateID">
                                                                    <?php endif; ?>
                                                                    <input type="hidden" name="type"
                                                                           value="<?php echo e(isset($emailTemplateOrderStatus->type)?$emailTemplateOrderStatus->type:'order_status'); ?>">
                                                                    <textarea class="form-control" name="subject"
                                                                              rows="2"
                                                                              placeholder="<?php echo e(trans('layout.email_subject')); ?>"><?php echo e(isset($emailTemplateOrderStatus->subject)?$emailTemplateOrderStatus->subject:''); ?></textarea>
                                                                    <textarea class="form-control mt-2" name="body"

                                                                              rows="5"
                                                                              placeholder="<?php echo e(trans('layout.email_body')); ?>"><?php echo e(isset($emailTemplateOrderStatus->body)?$emailTemplateOrderStatus->body:''); ?></textarea>

                                                                    <div>{customer_name} = Customer Name</div>
                                                                    <div>{order_no} = Order no</div>
                                                                    <div>{status} = Status</div>
                                                                    <button type="submit"
                                                                            class="btn btn-primary float-right mt-4">
                                                                        <?php echo e(trans('layout.submit')); ?>

                                                                    </button>
                                                                </form>
                                                            </div>
                                                            <div id="v-pills-planRequest" class="tab-pane fade">
                                                                <form action="<?php echo e(route('email.template.store')); ?>"
                                                                      method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($emailTemplatePlanRequest)): ?>
                                                                        <input type="hidden"
                                                                               value="<?php echo e($emailTemplatePlanRequest->id); ?>"
                                                                               name="emailTemplateID">
                                                                    <?php endif; ?>
                                                                    <input type="hidden" name="type"
                                                                           value="<?php echo e(isset($emailTemplatePlanRequest->type)?$emailTemplatePlanRequest->type:'plan_request'); ?>">
                                                                    <textarea class="form-control" name="subject"
                                                                              rows="2"
                                                                              placeholder="<?php echo e(trans('layout.email_subject')); ?>"><?php echo e(isset($emailTemplatePlanRequest->subject)?$emailTemplatePlanRequest->subject:''); ?></textarea>
                                                                    <textarea class="form-control mt-2" name="body"

                                                                              rows="5"
                                                                              placeholder="<?php echo e(trans('layout.email_body')); ?>"><?php echo e(isset($emailTemplatePlanRequest->body)?$emailTemplatePlanRequest->body:''); ?></textarea>

                                                                    <div>{customer_name} = Customer Name</div>
                                                                    <button type="submit"
                                                                            class="btn btn-primary float-right mt-4">
                                                                        <?php echo e(trans('layout.submit')); ?>

                                                                    </button>
                                                                </form>
                                                            </div>
                                                            <div id="v-pills-planAccepted" class="tab-pane fade">
                                                                <form action="<?php echo e(route('email.template.store')); ?>"
                                                                      method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($emailTemplatePlanAccepted)): ?>
                                                                        <input type="hidden"
                                                                               value="<?php echo e($emailTemplatePlanAccepted->id); ?>"
                                                                               name="emailTemplateID">
                                                                    <?php endif; ?>
                                                                    <input type="hidden" name="type"
                                                                           value="<?php echo e(isset($emailTemplatePlanAccepted->type)?$emailTemplatePlanAccepted->type:'plan_accepted'); ?>">
                                                                    <textarea class="form-control" name="subject"
                                                                              rows="2"
                                                                              placeholder="<?php echo e(trans('layout.email_subject')); ?>"><?php echo e(isset($emailTemplatePlanAccepted->subject)?$emailTemplatePlanAccepted->subject:''); ?></textarea>
                                                                    <textarea class="form-control mt-2" name="body"

                                                                              rows="5"
                                                                              placeholder="<?php echo e(trans('layout.email_body')); ?>"><?php echo e(isset($emailTemplatePlanAccepted->body)?$emailTemplatePlanAccepted->body:''); ?></textarea>

                                                                    <div>{customer_name} = Customer Name</div>
                                                                    <button type="submit"
                                                                            class="btn btn-primary float-right mt-4">
                                                                        <?php echo e(trans('layout.submit')); ?>

                                                                    </button>
                                                                </form>
                                                            </div>
                                                            <div id="v-pills-planExpire" class="tab-pane fade">
                                                                <form action="<?php echo e(route('email.template.store')); ?>"
                                                                      method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($emailTemplatePlanExpire)): ?>
                                                                        <input type="hidden"
                                                                               value="<?php echo e($emailTemplatePlanExpire->id); ?>"
                                                                               name="emailTemplateID">
                                                                    <?php endif; ?>
                                                                    <input type="hidden" name="type"
                                                                           value="<?php echo e(isset($emailTemplatePlanExpire->type)?$emailTemplatePlanExpire->type:'plan_expired'); ?>">
                                                                    <textarea class="form-control" name="subject"
                                                                              rows="2"
                                                                              placeholder="<?php echo e(trans('layout.email_subject')); ?>"><?php echo e(isset($emailTemplatePlanExpire->subject)?$emailTemplatePlanExpire->subject:''); ?></textarea>
                                                                    <textarea class="form-control mt-2" name="body"

                                                                              rows="5"
                                                                              placeholder="<?php echo e(trans('layout.email_body')); ?>"><?php echo e(isset($emailTemplatePlanExpire->body)?$emailTemplatePlanExpire->body:''); ?></textarea>

                                                                    <div>{customer_name} = Customer Name</div>
                                                                    <button type="submit"
                                                                            class="btn btn-primary float-right mt-4">
                                                                        <?php echo e(trans('layout.submit')); ?>

                                                                    </button>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('payment_gateway_setting')): ?>
                            <div class="tab-pane fade" id="paymentGateway">
                                <div class="pt-4">
                                    <div class="col-xl-12">
                                        <div class="card">
                                            <div class="card-body">
                                                <div class="row">
                                                    <div class="col-xl-3">
                                                        <div class="nav nav-pills mb-3 nav-flex">
                                                            <a href="#v-pills-paypalPay" data-toggle="pill"
                                                               class="nav-link active show custom-nav flex-content"><?php echo e(trans('layout.paypal')); ?></a>
                                                            <a href="#v-pills-stripePay" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.stripe')); ?></a>
                                                            <a href="#v-pills-paytm" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.paytm')); ?></a>
                                                            <a href="#v-pills-mollie" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.mollie')); ?></a>
                                                            <a href="#v-pills-paystack" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.paystack')); ?></a>
                                                            <a href="#v-pills-offline" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.offline')); ?></a>
                                                        </div>
                                                    </div>
                                                    <div class="col-xl-9">
                                                        <form action="<?php echo e(route('payment.gateway')); ?>" method="post">
                                                            <div class="tab-content">

                                                                <?php $rest_gateways=get_restaurant_gateway_settings(auth()->id()) ?>

                                                                <?php echo csrf_field(); ?>
                                                                <?php if(auth()->user()->type=='admin'): ?>
                                                                    <?php if(isset($payment_gateway_id)): ?>
                                                                        <input type="hidden"
                                                                               name="payment_gateway_id"
                                                                               value="<?php echo e($payment_gateway_id); ?>">
                                                                    <?php endif; ?>
                                                                    <?php echo $__env->make('settings.admin_payment_gateway', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

                                                                <?php else: ?>
                                                                    <?php if($rest_gateways): ?>
                                                                        <input type="hidden"
                                                                               name="rest_payment_gateway_id"
                                                                               value="<?php echo e($rest_gateways->id); ?>">
                                                                        <?php $rest_gateways_credentials=json_decode(get_restaurant_gateway_settings(auth()->id())->value); ?>
                                                                    <?php endif; ?>

                                                                    <?php echo $__env->make('settings.restaurant_payment_gateway', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

                                                                <?php endif; ?>

                                                            </div>
                                                            <button type="submit"
                                                                    class="btn btn-primary float-right mt-4">
                                                                <?php echo e(trans('layout.submit')); ?>

                                                            </button>
                                                        </form>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('sms_gateway_setting')): ?>
                            <div class="tab-pane fade" id="smsGateway">
                                <div class="pt-4">
                                    <div class="col-xl-12">
                                        <div class="card">
                                            <div class="card-body">
                                                <div class="row">
                                                    <div class="col-xl-3">
                                                        <div class="nav nav-pills mb-3 nav-flex">
                                                            <a href="#v-pills-twilio" data-toggle="pill"
                                                               class="nav-link active show custom-nav flex-content"><?php echo e(trans('layout.twilio')); ?></a>
                                                            <a href="#v-pills-voyager" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.voyager')); ?></a>
                                                            <a href="#v-pills-signalwire" data-toggle="pill"
                                                               class="nav-link custom-nav flex-content"><?php echo e(trans('layout.signalwire')); ?></a>
                                                        </div>
                                                    </div>
                                                    <div class="col-xl-9">
                                                        <form action="<?php echo e(route('sms.gateway')); ?>" method="post">
                                                            <div class="tab-content">
                                                                <div id="v-pills-twilio"
                                                                     class="tab-pane fade active show">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php if(isset($sms_gateway_id)): ?>
                                                                        <input type="hidden" name="sms_gateway_id"
                                                                               value="<?php echo e($sms_gateway_id); ?>">
                                                                    <?php endif; ?>
                                                                    <div class="form-group">
                                                                        <label
                                                                            for="exampleInputPassword1"><?php echo e(trans('layout.sid')); ?></label>
                                                                        <input
                                                                            value="<?php echo e(isset($sms_gateway->twilio_sid)?$sms_gateway->twilio_sid:''); ?>"
                                                                            type="text" name="twilio_sid"
                                                                            class="form-control">
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label
                                                                            for="exampleInputPassword1"><?php echo e(trans('layout.token')); ?></label>
                                                                        <input
                                                                            value="<?php echo e(isset($sms_gateway->twilio_token)?$sms_gateway->twilio_token:''); ?>"
                                                                            type="text" name="twilio_token"
                                                                            class="form-control">
                                                                    </div>
                                                                </div>
                                                                <div id="v-pills-voyager" class="tab-pane fade">
                                                                    <div class="form-group">
                                                                        <label
                                                                            for="exampleInputPassword1"><?php echo e(trans('layout.api_key')); ?></label>
                                                                        <input
                                                                            value="<?php echo e(isset($sms_gateway->voyager_api)?$sms_gateway->voyager_api:''); ?>"
                                                                            type="text" name="voyager_api"
                                                                            class="form-control">
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label
                                                                            for="exampleInputPassword1"><?php echo e(trans('layout.api_secret')); ?></label>
                                                                        <input
                                                                            value="<?php echo e(isset($sms_gateway->voyager_api_secret)?$sms_gateway->voyager_api_secret:''); ?>"
                                                                            type="text" name="voyager_api_secret"
                                                                            class="form-control">
                                                                    </div>
                                                                </div>
                                                                <div id="v-pills-signalwire" class="tab-pane fade">
                                                                    <div class="form-group">
                                                                        <label
                                                                            for="exampleInputPassword1"><?php echo e(trans('layout.project_id')); ?></label>
                                                                        <input
                                                                            value="<?php echo e(isset($sms_gateway->signalwire_project_id)?$sms_gateway->signalwire_project_id:''); ?>"
                                                                            type="text" name="signalwire_project_id"
                                                                            class="form-control">
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label
                                                                            for="exampleInputPassword1"><?php echo e(trans('layout.space_url')); ?></label>
                                                                        <input
                                                                            value="<?php echo e(isset($sms_gateway->signalware_url)?$sms_gateway->signalware_url:''); ?>"
                                                                            type="text" name="signalware_url"
                                                                            class="form-control">
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label
                                                                            for="exampleInputPassword1"><?php echo e(trans('layout.token')); ?></label>
                                                                        <input
                                                                            value="<?php echo e(isset($sms_gateway->signalware_token)?$sms_gateway->signalware_token:''); ?>"
                                                                            type="text" name="signalware_token"
                                                                            class="form-control">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <button type="submit"
                                                                    class="btn btn-primary float-right mt-4">
                                                                <?php echo e(trans('layout.submit')); ?>

                                                            </button>
                                                        </form>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php endif; ?>
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('role_permission')): ?>
                            <div class="tab-pane fade" id="rolePermission">
                                <div class="pt-4">
                                    <div class="col-xl-12">
                                        <div class="card">
                                            <form class="<?php echo e(auth()->user()->type=='admin'?'':'d-none'); ?>"
                                                  action="<?php echo e(route('settings.permission.update')); ?>" method="post">
                                                <?php echo csrf_field(); ?>
                                                <div class="card-body">
                                                    <div class="row mb-2 d-none">
                                                        <div class="col-lg-2">
                                                            <label>Admin</label>
                                                        </div>
                                                        <div class="col-lg-10">
                                                            <div class="row">
                                                                <?php $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <div class="col-4">
                                                                        <div
                                                                            class="custom-control custom-checkbox mb-3 checkbox-info">
                                                                            <input
                                                                                <?php echo e(in_array($permission->name,$admin_permissions)?'checked':''); ?> name="admin_permission[]"
                                                                                value="<?php echo e($permission->name); ?>"
                                                                                type="checkbox"
                                                                                class="custom-control-input"
                                                                                id="admin-permission-<?php echo e($permission->id); ?>">
                                                                            <label class="custom-control-label"
                                                                                   for="admin-permission-<?php echo e($permission->id); ?>"><?php echo e(ucfirst(str_replace('_',' ',$permission->name))); ?></label>
                                                                        </div>
                                                                    </div>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row mb-2 <?php echo e(auth()->user()->type=='admin'?'':'d-none'); ?>">
                                                        <div class="col-lg-2">
                                                            <label>Restaurant Owner</label>
                                                        </div>
                                                        <div class="col-lg-10">
                                                            <div class="row">
                                                                <?php $__currentLoopData = $permissions->whereIn('name',get_restaurant_permissions()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <div class="col-4">
                                                                        <div
                                                                            class="custom-control custom-checkbox mb-3 checkbox-info">
                                                                            <input
                                                                                <?php echo e(in_array($permission->name,$rest_owner_permissions)?'checked':''); ?> name="rest_owner_permission[]"
                                                                                value="<?php echo e($permission->name); ?>"
                                                                                type="checkbox"
                                                                                class="custom-control-input"
                                                                                id="rest_owner-permission-<?php echo e($permission->id); ?>">
                                                                            <label class="custom-control-label"
                                                                                   for="rest_owner-permission-<?php echo e($permission->id); ?>"><?php echo e(ucfirst(str_replace('_',' ',$permission->name))); ?></label>
                                                                        </div>
                                                                    </div>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <hr class="<?php echo e(auth()->user()->type=='admin'?'':'d-none'); ?>">
                                                    <div class="row mb-2 <?php echo e(auth()->user()->type=='admin'?'':'d-none'); ?>">
                                                        <div class="col-lg-2">
                                                            <label>Customer</label>
                                                        </div>
                                                        <div class="col-lg-10">
                                                            <div class="row">
                                                                <?php $__currentLoopData = $permissions->whereIn('name',get_customer_permissions()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <div class="col-4">
                                                                        <div
                                                                            class="custom-control custom-checkbox mb-3 checkbox-info">
                                                                            <input
                                                                                <?php echo e(in_array($permission->name,$customer_permissions)?'checked':''); ?> name="customer_permission[]"
                                                                                value="<?php echo e($permission->name); ?>"
                                                                                type="checkbox"
                                                                                class="custom-control-input"
                                                                                id="customer-permission-<?php echo e($permission->id); ?>">
                                                                            <label class="custom-control-label"
                                                                                   for="customer-permission-<?php echo e($permission->id); ?>"><?php echo e(ucfirst(str_replace('_',' ',$permission->name))); ?></label>
                                                                        </div>
                                                                    </div>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="card-footer text-right">
                                                    <button
                                                        class="btn btn-sm btn-primary"><?php echo e(trans('layout.submit')); ?></button>
                                                </div>
                                            </form>
                                            <?php if(auth()->user()->type=='restaurant_owner'): ?>
                                                <form action="<?php echo e(route('user.permission.update')); ?>" method="post">
                                                    <?php echo csrf_field(); ?>
                                                    <?php echo method_field('put'); ?>
                                                    <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <?php if($role->name !='admin' && $role->name !='customer' &&  $role->name != 'restaurant_owner'): ?>
                                                            <?php if(auth()->user()->id==$role->restaurant_id): ?>
                                                                <div class="row mb-2" id="show_role_<?php echo e($role->name); ?>">
                                                                    <div class="col-lg-2">
                                                                        <label><?php echo e($role->name); ?> <span
                                                                                class="float-right ml-3"><a
                                                                                    href="#"><i
                                                                                        data-role="<?php echo e($role->name); ?>"
                                                                                        class="fa fa-trash text-danger"></i></a></span></label>
                                                                    </div>
                                                                    <div class="col-lg-10">
                                                                        <div class="row">
                                                                            <input type="hidden" value="<?php echo e($role->name); ?>"
                                                                                   name="role_name[]">
                                                                            <?php $rolePermissions= \Spatie\Permission\Models\Role::findByName($role->name)->getAllPermissions()->pluck('name')->toArray();?>
                                                                            <?php $__currentLoopData = get_user_permission(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                                <div class="col-sm-4 display">
                                                                                    <div class="form-group clearfix">
                                                                                        <div class="icheck-success">
                                                                                            <input
                                                                                                name="permission[<?php echo e($role->id); ?>][]"
                                                                                                value="<?php echo e($permission); ?>"
                                                                                                <?php echo e(in_array($permission,$rolePermissions)?'checked':''); ?> type="checkbox"
                                                                                                id="checkboxSuccess_<?php echo e($permission); ?>_<?php echo e($role->name); ?>">
                                                                                            <label
                                                                                                for="checkboxSuccess_<?php echo e($permission); ?>_<?php echo e($role->name); ?>"
                                                                                                class="text-muted d-inline ml-2">
                                                                                                <?php echo e(strtoupper(str_replace('_',' ',$permission))); ?>

                                                                                            </label>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            <?php endif; ?>
                                                        <?php endif; ?>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                                    <div class="text-right mt-2">
                                                        <button type="submit"
                                                                class="btn btn-primary"><?php echo e(trans('layout.submit')); ?></button>
                                                    </div>
                                                </form>
                                                <div class="text-right p-4">
                                                    <button type="button"
                                                            class="btn btn-md btn-primary float-left"
                                                            data-toggle="modal"
                                                            data-target="#modal-default"><?php echo e(trans('Add New Role')); ?>

                                                    </button>
                                                </div>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="modal-default">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <form action="<?php echo e(route('user.permission.store')); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('put'); ?>
                    <div class="modal-header">
                        <h4 class="modal-title"><?php echo e(trans('Permission')); ?></h4>
                        <button type="button" class="close" data-dismiss="modal"
                                aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-sm-12">


                                <div class="form-group">
                                    <label for=""><?php echo e(trans('Role Name')); ?></label>
                                    <input type="text" name="role_name"
                                           class="form-control">
                                </div>
                            </div>
                            <?php $__currentLoopData = $permissions->whereIn('name',get_user_permission()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-sm-4" style="text-wrap: inherit">
                                    <div class="form-group clearfix display">
                                        <div class="icheck-success">
                                            <input type="checkbox"
                                                   id="checkboxSuccess_<?php echo e($permission->name); ?>"
                                                   value="<?php echo e($permission->name); ?>"
                                                   name="permission[]">
                                            <label class="text-muted d-inline"
                                                   for="checkboxSuccess_<?php echo e($permission->name); ?>">
                                                <?php echo e(strtoupper(str_replace('_',' ',$permission->name))); ?>

                                            </label>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        </div>
                    </div>
                    <div class="modal-footer justify-content-between">
                        <button type="button" class="btn btn-default"
                                data-dismiss="modal">
                            Close
                        </button>
                        <button type="submit"
                                class="btn btn-primary"><?php echo e(trans('layout.submit')); ?></button>
                    </div>
                </form>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

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

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

    <script src="<?php echo e(asset('vendor/select2/js/select2.full.min.js')); ?>"></script>
    <script !src="">
        $(document).on('click', '.fa-trash', function (e) {
            e.preventDefault();

            const role = $(this).attr('data-role');
            $.ajax({
                method: "get",
                url: "<?php echo e(route('user.role.delete')); ?>",
                data: {
                    role: role,
                },

                success: function (res) {
                    let html = '';
                    if (res.status == 'success') {
                        $('#show_role_' + role).remove();
                    } else {
                        toastr.error(res.message, 'failed', {timeOut: 5000});
                    }
                }
            })
        });

        $(document).ready(function () {
            $("#timezone").selectpicker({
                liveSearch: true
            });
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\php\picoqr_workflow\resources\views/settings/index.blade.php ENDPATH**/ ?>