<?php $__env->startSection('title', 'Opciones'); ?>

<?php $__env->startSection('body'); ?>
    <body class="has-navbar-vertical-aside navbar-vertical-aside-show-xl footer-offset"
          data-offset="80"
          data-hs-scrollspy-options='{
    "target": "#navbarSettings"
    }'
    >
    <?php $__env->stopSection(); ?>

    <?php $__env->startSection('content'); ?>
        <!-- Page Header -->
        <div class="page-header">
            <div class="row align-items-end">
                <div class="col-sm mb-2 mb-sm-0">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb breadcrumb-no-gutter">
                            <li class="breadcrumb-item"><a class="breadcrumb-link" href="javascript:;">Administración</a></li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo $__env->yieldContent('title'); ?></li>
                        </ol>
                    </nav>

                    <h1 class="page-header-title"><?php echo $__env->yieldContent('title'); ?></h1>
                </div>
            </div>
            <!-- End Row -->
        </div>
        <!-- End Page Header -->

        <div class="row">
            <div class="col-lg-3">
                <!-- Navbar -->
                <div class="navbar-vertical navbar-expand-lg mb-3 mb-lg-5">
                    <!-- Navbar Toggle -->
                    <button type="button" class="navbar-toggler btn btn-block btn-white mb-3" aria-label="Toggle navigation" aria-expanded="false" aria-controls="navbarVerticalNavMenu" data-toggle="collapse" data-target="#navbarVerticalNavMenu">
                <span class="d-flex justify-content-between align-items-center">
                  <span class="h5 mb-0">Nav menu</span>

                  <span class="navbar-toggle-default">
                    <i class="tio-menu-hamburger"></i>
                  </span>

                  <span class="navbar-toggle-toggled">
                    <i class="tio-clear"></i>
                  </span>
                </span>
                    </button>
                    <!-- End Navbar Toggle -->

                    <div id="navbarVerticalNavMenu" class="collapse navbar-collapse">
                        <!-- Navbar Nav -->
                        <ul id="navbarSettings" class="js-sticky-block js-scrollspy navbar-nav navbar-nav-lg nav-tabs card card-navbar-nav"
                            data-hs-sticky-block-options='{
                       "parentSelector": "#navbarVerticalNavMenu",
                       "breakpoint": "lg",
                       "startPoint": "#navbarVerticalNavMenu",
                       "endPoint": "#stickyBlockEndPoint",
                       "stickyOffsetTop": 20
                     }'>
                            <?php $__currentLoopData = $output; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li class="nav-item">
                                    <a class="nav-link" href="#tab_<?php echo e($group->key); ?>">
                                        <i class="tio-circle-outlined nav-icon"></i> <?php echo e($group->name); ?>

                                    </a>
                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                        <!-- End Navbar Nav -->
                    </div>
                </div>
                <!-- End Navbar -->
            </div>

            <div class="col-lg-9">
            <?php echo Form::open([
                'files' => true
            ]); ?>

            <?php $__currentLoopData = $output; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <!-- Card -->
                    <div class="card mb-3 mb-lg-5" id="tab_<?php echo e($group->key); ?>">
                        <div class="card-header">
                            <h2 class="card-title h4"><?php echo e($group->name); ?></h2>
                        </div>

                        <!-- Body -->
                        <div class="card-body">
                            <!-- Form -->
                        <?php $__currentLoopData = $group->options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <!-- Form Group -->
                                <div class="row form-group align-items-center">
                                    <label for="firstNameLabel" class="col-sm-3 col-form-label input-label"><?php echo e($option->title); ?> <?php if($option->text): ?><i class="tio-help-outlined text-body ml-1" data-toggle="tooltip" data-placement="top" title="<?php echo e($option->text); ?>"></i><?php endif; ?></label>

                                    <div class="col-sm-9">
                                        <?php if($option->input == 'text'): ?>
                                            <?php echo Form::text($option->name, $option->value, ['class' => 'form-control']); ?>

                                        <?php elseif($option->input == 'textarea'): ?>
                                            <?php echo Form::textarea($option->name, $option->value, ['class' => 'form-control', 'rows' => 3]); ?>

                                        <?php elseif($option->input == 'color'): ?>
                                            <?php echo Form::color($option->name, $option->value, ['class' => 'form-control p-0']); ?>

                                        <?php elseif($option->input == 'checkbox'): ?>
                                            <label class="toggle-switch" for="activeSwitch1">
                                                <?php echo Form::hidden($option->name, 0); ?>

                                                <?php echo Form::checkbox($option->name, 1, $option->value, ['class' => 'toggle-switch-input', 'id' => 'activeSwitch1']); ?>

                                                <span class="toggle-switch-label">
                                                  <span class="toggle-switch-indicator"></span>
                                                </span>
                                            </label>
                                        <?php elseif($option->input == 'image'): ?>
                                        <!-- Avatar -->
                                            <label class="avatar avatar-xxl avatar-uploader mr-5" for="avatarUploader_<?php echo e($option->name); ?>">
                                                <img id="avatarImg_<?php echo e($option->name); ?>" class="avatar-img" src="<?php echo e(asset($option->value ?? 'backend-assets/img/160x160/img1.jpg')); ?>" alt="Image Description">
                                                <?php echo Form::hidden($option->name, $option->value, ['id' => $option->name]); ?>

                                                <input type="file" class="js-file-attach avatar-uploader-input" id="avatarUploader_<?php echo e($option->name); ?>" data-hs-file-attach-options='{
                                              "textTarget": "#avatarImg_<?php echo e($option->name); ?>",
                                              "mode": "image",
                                              "targetAttr": "src",
                                              "resetTarget": ".js-file-attach-reset-img-<?php echo e($option->id); ?>",
                                              "resetImg": "<?php echo e(asset('backend-assets/img/160x160/img1.jpg')); ?>",
                                              "allowTypes": [".png", ".jpeg", ".jpg"]
                                           }' name="<?php echo e($option->name); ?>">

                                                <span class="avatar-uploader-trigger">
                                                  <i class="tio-edit avatar-uploader-icon shadow-soft"></i>
                                                </span>
                                            </label>
                                            <!-- End Avatar -->

                                            <button type="button" class="js-file-attach-reset-img-<?php echo e($option->id); ?> js-file-attach-reset-img btn btn-white" data-target="#<?php echo e($option->name); ?>">Borrar</button>
                                        <?php endif; ?>
                                    </div>
                                </div>
                                <!-- End Form Group -->
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            <div class="d-flex justify-content-end">
                                <button type="submit" class="btn btn-primary">Guardar</button>
                            </div>
                        <!-- End Form -->
                        </div>
                        <!-- End Body -->
                    </div>
                    <!-- End Card -->
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php echo Form::close(); ?>


                <!-- Sticky Block End Point -->
                <div id="stickyBlockEndPoint"></div>
            </div>
        </div>
        <!-- End Row -->

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

    <?php $__env->startPush('scripts'); ?>
        <script src="<?php echo e(asset('backend-assets/vendor/hs-navbar-vertical-aside/hs-navbar-vertical-aside-mini-cache.js')); ?>"></script>
        <!-- JS Plugins Init. -->
        <script>
          $(document).on('ready', function () {
            // INITIALIZATION OF STICKY BLOCKS
            // =======================================================
            $('.js-sticky-block').each(function () {
              var stickyBlock = new HSStickyBlock($(this), {
                targetSelector: $('#header').hasClass('navbar-fixed') ? '#header' : null
              }).init();
            });


            // INITIALIZATION OF SCROLL NAV
            // =======================================================
            var scrollspy = new HSScrollspy($('body'), {
              // !SETTING "resolve" PARAMETER AND RETURNING "resolve('completed')" IS REQUIRED
              beforeScroll: function(resolve) {
                if (window.innerWidth < 992) {
                  $('#navbarVerticalNavMenu').collapse('hide').on('hidden.bs.collapse', function () {
                    return resolve('completed');
                  });
                } else {
                  return resolve('completed');
                }
              }
            }).init();
          });
        </script>
    <?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.backend', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/bgreen/test.bgreen.com.py/resources/views/backend/options/index.blade.php ENDPATH**/ ?>