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

<?php echo $__env->make('admin.dashboard.partials.navigation', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<div class="row animated fadeIn">

    <div class="col-lg-12 widget-content pb-5">

        <div class="my-3 p-3 bg-white rounded shadow-sm">
            <h6 class=" pb-2 mb-2">
                <form method="POST" action="<?php echo e(route('admin.dashboard.post.generate.sitemap')); ?>">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" value="apps" name="sitemap_type" />
                    <button  type="submit" class="btn btn-sm btn-dark btn-block"> Generate sitemap for apps</button>
                </form>
            </h6>
            <?php if(isset($sitemapArray) && isset($sitemapArray['apps']) ): ?>
                <label>Apps main index url:
                    <a target="_blank" href="<?php echo e($sitemapArray['apps']['url']); ?>">
                        <?php echo e($sitemapArray['apps']['url']); ?>

                    </a>
                </label>
                <ul class="list-group">
                    <?php $__currentLoopData = $sitemapArray['apps']['sitemaps']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li  class="list-group-item">
                        <a target="_blank" href="<?php echo e($item); ?>">
                            <i class="fa fa-link mr-1"></i>  <?php echo e($item); ?>

                            </a>
                        </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            <?php endif; ?>
        </div>
        <div class="my-3 p-3 bg-white rounded shadow-sm">
            <h6 class=" pb-2 mb-0">
                <form method="POST" action="<?php echo e(route('admin.dashboard.post.generate.sitemap')); ?>">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" value="categories" name="sitemap_type" />
                    <button  type="submit" class="btn btn-sm btn-dark btn-block">  Generate sitemap for categories</button>
                </form>
            </h6>
            <?php if(isset($sitemapArray) && isset($sitemapArray['categories']) ): ?>
                <label>Categories main index url:
                    <a target="_blank" href="<?php echo e($sitemapArray['categories']['url']); ?>">
                        <?php echo e($sitemapArray['categories']['url']); ?>

                    </a>
                </label>

                <ul class="list-group">
                    <?php $__currentLoopData = $sitemapArray['categories']['sitemaps']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li  class="list-group-item">
                        <a target="_blank" href="<?php echo e($item); ?>">
                            <i class="fa fa-link mr-1"></i>  <?php echo e($item); ?>

                            </a>
                        </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            <?php else: ?>
                <p class="text-center mt-2 mb-0"> No sitemaps found. Please generate one</p>
            <?php endif; ?>
        </div>

        <div class="my-3 p-3 bg-white rounded shadow-sm">
                <h6 class=" pb-2 mb-0">
                    <form method="POST" action="<?php echo e(route('admin.dashboard.post.generate.sitemap')); ?>">
                        <?php echo csrf_field(); ?>
                        <input type="hidden" value="pages" name="sitemap_type" />
                        <button  type="submit" class="btn btn-sm btn-dark btn-block">  Generate sitemap for pages</button>
                    </form>
                </h6>
                <?php if(isset($sitemapArray) && isset($sitemapArray['pages']) ): ?>
                    <label>Pages main index url:
                        <a target="_blank" href="<?php echo e($sitemapArray['pages']['url']); ?>">
                            <?php echo e($sitemapArray['pages']['url']); ?>

                        </a>
                    </label>
                    <ul class="list-group">
                        <?php $__currentLoopData = $sitemapArray['pages']['sitemaps']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li  class="list-group-item">
                            <a target="_blank" href="<?php echo e($item); ?>">
                                <i class="fa fa-link mr-1"></i>  <?php echo e($item); ?>

                                </a>
                            </li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                <?php else: ?>
                    <p class="text-center mt-2 mb-0"> No sitemaps found. Please generate one</p>
                <?php endif; ?>
            </div>
        <div class="my-3 p-3 bg-white rounded shadow-sm">
            <h6 class="border-bottom border-gray pb-2 mb-0">
                <form method="POST" action="<?php echo e(route('admin.dashboard.post.generate.sitemap')); ?>">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" value="all" name="sitemap_type" />
                    <button  type="submit" class="btn btn-sm btn-dark btn-block"> Generate All Sitemaps</button>
                </form>
            </h6>


            <?php if( isset($isSitemapIndexExists) && $isSitemapIndexExists === true): ?>
                
                <label>Main sitemap index url</label>
                <ul class="list-group">
                    <li  class="list-group-item">
                        <a target="_blank" href="<?php echo e(url('sitemap/sitemap.xml')); ?>">
                            <i class="fa fa-link mr-1"></i>  <?php echo e(url('sitemap/sitemap.xml')); ?>

                        </a>
                    </li>
                </ul>
             <?php else: ?>
                <p class="text-center mt-2 mb-0"> No sitemap.xml found. Please generate all</p>
            <?php endif; ?>

        </div>
    </div>

</div>


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


<?php $__env->startPush('javascript'); ?>

<?php $__env->stopPush(); ?>
<?php echo $__env->make( "layouts.master-admin", \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>