<?php $__env->startSection('site_title', formatTitle([__('Indexed pages checker'), __('Tool'), config('settings.title')])); ?>

<?php $__env->startSection('head_content'); ?>
    <meta name="description" content="<?php echo e(__($tool->description)); ?>">
<?php $__env->stopSection(); ?>

<?php echo $__env->make('shared.breadcrumbs', ['breadcrumbs' => [
    ['url' => route('dashboard'), 'title' => __('Home')],
    ['url' => route('tools'), 'title' => __('Tools')],
    ['title' => __('Tool')],
]], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="d-flex">
    <h1 class="h2 mb-3 text-break"><?php echo e(__('Indexed pages checker')); ?></h1>
</div>

<div class="card border-0 shadow-sm">
    <div class="card-header align-items-center">
        <div class="row">
            <div class="col">
                <div class="font-weight-medium py-1"><?php echo e(__('Indexed pages checker')); ?></div>
            </div>
        </div>
    </div>
    <div class="card-body position-relative">
        <?php echo $__env->make('shared.message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <form action="<?php echo e(route('tools.indexed_pages_checker')); ?>" method="post" enctype="multipart/form-data" id="indexed-pages-checker-form" <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->denies('tools', ['App\Models\User'])): ?> class="position-relative opacity-20 min-height-80" <?php endif; ?>>
            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->denies('tools', ['App\Models\User'])): ?>
                <div class="position-absolute top-0 right-0 bottom-0 left-0 z-1 bg-fade-0"></div>
            <?php endif; ?>

            <?php echo csrf_field(); ?>

            <div class="form-group">
                <label for="i-domain"><?php echo e(__('Domain')); ?></label>
                <input type="text" dir="ltr" name="domain" id="i-domain" class="form-control<?php echo e($errors->has('domain') ? ' is-invalid' : ''); ?>" value="<?php echo e($domain ?? (old('domain') ?? '')); ?>">
                <?php if($errors->has('domain')): ?>
                    <span class="invalid-feedback d-block" role="alert">
                        <strong><?php echo e($errors->first('domain')); ?></strong>
                    </span>
                <?php endif; ?>
            </div>

            <div class="form-group">
                <label for="i-country"><?php echo e(__('Country')); ?></label>
                <select name="country" id="i-country" class="custom-select<?php echo e($errors->has('country') ? ' is-invalid' : ''); ?>">
                    <option value="" hidden disabled selected><?php echo e(__('Country')); ?></option>
                    <?php $__currentLoopData = array_diff_key(config('countries'), array_flip(['AX', 'BQ', 'CT', 'NQ', 'FQ', 'GG', 'IM', 'JE', 'JT', 'FX', 'MI', 'ME', 'NT', 'VD', 'PC', 'PZ', 'YD', 'BL', 'MF', 'RS', 'PU', 'SU', 'ZZ', 'WK'])); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($key); ?>" <?php if((isset($country) && $country == $key) || (!isset($country) && old('country') !== null && old('country') == $key) || (!isset($country) && config('settings.gcs_country') == $key && old('country') == null)): ?> selected <?php endif; ?>><?php echo e(__($value)); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('country')): ?>
                    <span class="invalid-feedback" role="alert">
                        <strong><?php echo e($errors->first('country')); ?></strong>
                    </span>
                <?php endif; ?>
            </div>

            <div class="row mx-n2">
                <div class="col px-2">
                    <?php if(config('settings.captcha_driver')): ?>
                        <?php if (isset($component)) { $__componentOriginalee67427ddad28b1fa5b3a4baf17c1836 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalee67427ddad28b1fa5b3a4baf17c1836 = $attributes; } ?>
<?php $component = Rahul900day\Captcha\Views\Components\Js::resolve(['lang' => ''.e(__('lang_code')).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('captcha-js'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Rahul900day\Captcha\Views\Components\Js::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalee67427ddad28b1fa5b3a4baf17c1836)): ?>
<?php $attributes = $__attributesOriginalee67427ddad28b1fa5b3a4baf17c1836; ?>
<?php unset($__attributesOriginalee67427ddad28b1fa5b3a4baf17c1836); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalee67427ddad28b1fa5b3a4baf17c1836)): ?>
<?php $component = $__componentOriginalee67427ddad28b1fa5b3a4baf17c1836; ?>
<?php unset($__componentOriginalee67427ddad28b1fa5b3a4baf17c1836); ?>
<?php endif; ?>

                        <?php if (isset($component)) { $__componentOriginal3af508b59ef7ab8c6981bbdd1e7fd66d = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal3af508b59ef7ab8c6981bbdd1e7fd66d = $attributes; } ?>
<?php $component = Rahul900day\Captcha\Views\Components\Button::resolve(['formId' => 'indexed-pages-checker-form'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('captcha-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Rahul900day\Captcha\Views\Components\Button::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'btn '.e($errors->has(formatCaptchaFieldName()) ? 'btn-danger' : 'btn-primary').'','data-sitekey' => ''.e(config('settings.captcha_site_key')).'','data-theme' => ''.e((config('settings.dark_mode') == 1 ? 'dark' : 'light')).'']); ?><?php echo e(__('Search')); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal3af508b59ef7ab8c6981bbdd1e7fd66d)): ?>
<?php $attributes = $__attributesOriginal3af508b59ef7ab8c6981bbdd1e7fd66d; ?>
<?php unset($__attributesOriginal3af508b59ef7ab8c6981bbdd1e7fd66d); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal3af508b59ef7ab8c6981bbdd1e7fd66d)): ?>
<?php $component = $__componentOriginal3af508b59ef7ab8c6981bbdd1e7fd66d; ?>
<?php unset($__componentOriginal3af508b59ef7ab8c6981bbdd1e7fd66d); ?>
<?php endif; ?>

                        <?php if($errors->has(formatCaptchaFieldName())): ?>
                            <span class="invalid-feedback d-block" role="alert">
                                <strong><?php echo e(__($errors->first(formatCaptchaFieldName()))); ?></strong>
                            </span>
                        <?php endif; ?>
                    <?php else: ?>
                        <button type="submit" name="submit" class="btn btn-primary"><?php echo e(__('Search')); ?></button>
                    <?php endif; ?>
                </div>
                <div class="col-auto px-2">
                    <a href="<?php echo e(route('tools.indexed_pages_checker')); ?>" class="btn btn-outline-secondary <?php echo e((__('lang_dir') == 'rtl' ? 'mr-auto' : 'ml-auto')); ?>"><?php echo e(__('Reset')); ?></a>
                </div>
            </div>
        </form>

        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->denies('tools', ['App\Models\User'])): ?>
            <div class="position-absolute top-0 right-0 bottom-0 left-0">
                <?php if(paymentProcessors()): ?>
                    <?php echo $__env->make('shared.features.locked', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php else: ?>
                    <?php echo $__env->make('shared.features.unavailable', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php endif; ?>
            </div>
        <?php endif; ?>
    </div>
</div>

<?php if(isset($result)): ?>
    <div class="card border-0 shadow-sm mt-3">
        <div class="card-header align-items-center">
            <div class="row">
                <div class="col">
                    <div class="font-weight-medium py-1"><?php echo e(__('Results')); ?></div>
                </div>
            </div>
        </div>

        <div class="card-body">
            <?php if(empty($result)): ?>
                <?php echo e(__('No results found.')); ?>

            <?php elseif(isset($result['error'])): ?>
                <?php echo e($result['error']['code'] ?? null); ?> <?php echo e($result['error']['message'] ?? null); ?>

            <?php else: ?>
                <div class="list-group list-group-flush my-n3">
                    <div class="list-group-item px-0">
                        <div class="row align-items-center">
                            <div class="col-12 col-lg-4 text-truncate text-muted"><?php echo e(__('Domain')); ?></div>
                            <div class="col-12 col-lg-8 text-truncate d-flex align-items-center">
                                <img src="<?php echo e(favicon($domain)); ?>" rel="noreferrer" class="width-4 height-4 <?php echo e((__('lang_dir') == 'rtl' ? 'ml-3' : 'mr-3')); ?>">

                                <span dir="ltr"><?php echo e($domain); ?></span>
                            </div>
                        </div>
                    </div>

                    <div class="list-group-item px-0">
                        <div class="row align-items-center">
                            <div class="col-12 col-lg-4 text-truncate text-muted"><?php echo e(__('Status')); ?></div>
                            <div class="col-12 col-lg-8 text-truncate d-flex align-items-center">
                                <?php if($result['searchInformation']['totalResults'] > 0): ?>
                                    <div class="bg-success width-4 height-4 rounded-circle <?php echo e((__('lang_dir') == 'rtl' ? 'ml-3' : 'mr-3')); ?>"></div>

                                    <div class="text-truncate"><?php echo e(__('Indexed')); ?></div>
                                <?php else: ?>
                                    <div class="bg-danger width-4 height-4 rounded-circle <?php echo e((__('lang_dir') == 'rtl' ? 'ml-3' : 'mr-3')); ?>"></div>

                                    <div class="text-truncate"><?php echo e(__('Not indexed')); ?></div>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>

                    <div class="list-group-item px-0">
                        <div class="row align-items-center">
                            <div class="col-12 col-lg-4 text-break text-muted"><?php echo e(__('Pages')); ?></div>
                            <div class="col-12 col-lg-8 text-break">≈<?php echo e(number_format($result['searchInformation']['totalResults'], 0, __('.'), __(','))); ?></div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
        </div>
    </div>
<?php endif; ?>
<?php /**PATH /home/seodean/public_html/resources/views/tools/tool/indexed-pages-checker.blade.php ENDPATH**/ ?>