<?php
    $currentJobTags = $jobTags ?? [];
    [$jobCategories, $jobTypes, $jobExperiences, $jobSkills, $maxSalaryRange, $jobTags] = JobBoardHelper::dataForFilter(request()->input());
    $currentJobTags = array_filter([...$currentJobTags, ...$jobTags->map->id->all()]);
?>

<div class="col-lg-3 col-md-12 filter-section col-sm-12 col-12 sidebar-filter-mobile">
    <div class="sidebar-shadow none-shadow mb-30">
        <div class="backdrop"></div>
        <div class="sidebar-filters sidebar-filter-mobile__inner">
            <?php echo Form::open(['url' => route('public.ajax.jobs'), 'method' => 'GET', 'id' => 'jobs-filter-form', 'class' => 'sidebar-filter-mobile__content']); ?>

                <input type="hidden" name="page" data-value="<?php echo e($jobs->currentPage() ?: 1); ?>" />
                <input type="hidden" name="keyword" value="<?php echo e(BaseHelper::stringify(request()->query('keyword'))); ?>" />
                <input type="hidden" name="per_page" />
                <input type="hidden" name="layout" />
                <input type="hidden" name="sort_by" value="<?php echo e(BaseHelper::stringify(request()->query('sort_by'))); ?>" />

                <?php if(Request::has('job_category') || isset($category)): ?>
                    <input type="hidden" name="job_categories[]" value="<?php echo e($category->id ?? Arr::first(Request::query('job_categories'))); ?>">
                    <input type="hidden" name="job_category" value="1">
                <?php endif; ?>

                <?php if(isset($cityId)): ?>
                    <input type="hidden" name="city_id" value="<?php echo e($cityId); ?>" />
                <?php endif; ?>

                <?php if(isset($stateId)): ?>
                    <input type="hidden" name="state_id" value="<?php echo e($stateId); ?>" />
                <?php endif; ?>

                <?php if(! empty($currentJobTags)): ?>
                    <?php $__currentLoopData = $currentJobTags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jobTag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <input type="hidden" name="job_tags[]" value="<?php echo e($jobTag); ?>" />
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>

                <div class="filter-block head-border mb-30">
                    <h5>
                        <?php echo e(__('Advanced Filters')); ?>

                        <a class="link-reset" href="<?php echo e(JobBoardHelper::getJobsPageURL()); ?>"><?php echo e(__('Reset')); ?></a>
                    </h5>
                </div>
                <div class="filter-block mb-30">
                    <div class="mb-3 select-style select-style-icon">
                        <?php if(! theme_option('hide_job_location_filter') && is_plugin_active('location') && (empty($stateId) && empty($cityId))): ?>
                            <select
                                class="form-control submit-form-filter form-icons select-active select-location"
                                form="jobs-filter-form" id="selectCity"
                                name="location"
                                data-location-type="<?php echo e(theme_option('job_location_filter_by', 'state')); ?>"
                                data-placeholder="<?php echo e(BaseHelper::stringify(request()->query('location')) ?: __('Select location')); ?>"
                            >
                            </select>
                            <i class="fi-rr-marker"></i>
                            <input type="hidden" name="location" value="<?php echo e(BaseHelper::stringify(request()->query('location'))); ?>">
                        <?php endif; ?>
                    </div>
                </div>

                <?php if(! Request::has('job_category') && ! Route::is('public.job-category') && $jobCategories->isNotEmpty()): ?>
                    <div class="filter-block mb-20">
                        <h5 class="medium-heading mb-15"><?php echo e(__('Industry')); ?></h5>
                        <div class="mb-3 ps-custom-scrollbar">
                            <ul class="list-checkbox">
                                <?php $__currentLoopData = $jobCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jobCategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li>
                                        <label class="cb-container">
                                            <input
                                                type="checkbox"
                                                class="submit-form-filter"
                                                name="job_categories[]"
                                                form="jobs-filter-form"
                                                <?php if(in_array($jobCategory->id, (array) request()->input('job_categories', []))): echo 'checked'; endif; ?>
                                                value="<?php echo e($jobCategory->id); ?>"
                                            >
                                            <span class="text-small"><?php echo e($jobCategory->name); ?></span>
                                            <span class="checkmark"></span>
                                        </label>
                                        <span class="number-item"><?php echo e($jobCategory->jobs_count ?: 0); ?></span>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                    </div>
                <?php endif; ?>

                <?php if($maxSalaryRange && (! JobBoardHelper::isSalaryHiddenForGuests() || auth('account')->check())): ?>
                    <div class="filter-block mb-20">
                        <h5 class="medium-heading mb-25"><?php echo e(__('Salary range')); ?></h5>
                        <div class="list-checkbox pb-20">
                            <div class="row position-relative mt-10 mb-20">
                                <div class="col-sm-12 box-slider-range">
                                    <div
                                        id="slider-range"
                                        data-current-range="<?php echo e(request()->query('offered_salary_from') > 0 ? BaseHelper::stringify(request()->query('offered_salary_from')) : 0); ?>"
                                        data-max-salary-range="<?php echo e($maxSalaryRange); ?>"
                                    ></div>
                                    <div class="salary-range mt-2"></div>
                                </div>
                                <div class="box-input-money">
                                    <input class="input-disabled form-control submit-form-filter" name="offered_salary_from" type="hidden" value="<?php echo e(request()->query('offered_salary_from') > 0 ? BaseHelper::stringify(request()->query('offered_salary_from')) : 0); ?>">
                                    <input class="input-disabled form-control submit-form-filter" name="offered_salary_to" type="hidden" value="<?php echo e(BaseHelper::stringify(request()->query('offered_salary_to', $maxSalaryRange))); ?>" data-default-value="<?php echo e($maxSalaryRange); ?>">
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?>

                <?php if($jobExperiences->isNotEmpty()): ?>
                    <div class="filter-block mb-30">
                        <h5 class="medium-heading mb-10"><?php echo e(__('Experience Level')); ?></h5>
                        <div class="mb-3 ps-custom-scrollbar">
                            <ul class="list-checkbox">
                                <?php $__currentLoopData = $jobExperiences; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jobExperience): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li>
                                        <label class="cb-container">
                                            <input
                                                type="checkbox"
                                                name="job_experiences[]"
                                                class="submit-form-filter"
                                                id="check-job-experience-<?php echo e($jobExperience->id); ?>" value="<?php echo e($jobExperience->id); ?>"
                                                form="jobs-filter-form"
                                                <?php if(in_array($jobExperience->id, (array) request()->input('job_experiences', []))): echo 'checked'; endif; ?>
                                            >
                                            <span class="text-small"><?php echo e($jobExperience->name); ?></span>
                                            <span class="checkmark"></span>
                                        </label>
                                        <span class="number-item"><?php echo e($jobExperience->jobs_count ?: 0); ?></span>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                    </div>
                <?php endif; ?>

                <div class="filter-block mb-30">
                    <h5 class="medium-heading mb-10"><?php echo e(__('Job Posted')); ?></h5>
                    <div class="mb-3">
                        <ul class="list-checkbox">
                            <?php $__currentLoopData = JobBoardHelper::postedDateRanges(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li>
                                    <label class="cb-container">
                                        <input
                                            type="checkbox"
                                            class="submit-form-filter"
                                            name="date_posted"
                                            value="<?php echo e($key); ?>"
                                            id="date-posted-<?php echo e($key); ?>"
                                            form="jobs-filter-form"
                                            <?php if($key == request()->input('date_posted')): echo 'checked'; endif; ?>
                                        >
                                        <span class="text-small"><?php echo e($item['name']); ?></span>
                                        <span class="checkmark"></span>
                                    </label>
                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                </div>

            <?php if($jobTypes->isNotEmpty()): ?>
                <div class="filter-block mb-20">
                    <h5 class="medium-heading mb-15"><?php echo e(__('Job type')); ?></h5>
                    <div class="mb-3 ps-custom-scrollbar">
                        <ul class="list-checkbox">
                            <?php $__currentLoopData = $jobTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jobType): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li>
                                    <label class="cb-container">
                                        <input
                                            type="checkbox"
                                            class="submit-form-filter"
                                            value="<?php echo e($jobType->id); ?>"
                                            name="job_types[]"
                                            id="check-job-type-<?php echo e($jobType->id); ?>"
                                            form="jobs-filter-form"
                                            <?php if(in_array($jobType->id, (array) request()->input('job_types', []))): echo 'checked'; endif; ?>
                                        >
                                        <span class="text-small"><?php echo e($jobType->name); ?></span>
                                        <span class="checkmark"></span>
                                    </label>
                                    <span class="number-item"><?php echo e($jobType->jobs_count ?: 0); ?></span>
                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                </div>
            <?php endif; ?>

            <?php if($jobSkills->isNotEmpty()): ?>
                <div class="filter-block mb-20">
                    <h5 class="medium-heading mb-15"><?php echo e(__('Skill')); ?></h5>
                    <div class="mb-3 ps-custom-scrollbar">
                        <ul class="list-checkbox">
                            <?php $__currentLoopData = $jobSkills; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $skill): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li>
                                    <label class="cb-container">
                                        <input
                                            type="checkbox"
                                            class="submit-form-filter"
                                            name="job_skills[]"
                                            id="btn-check-outlined-<?php echo e($skill->id); ?>"
                                            autocomplete="off"
                                            form="jobs-filter-form"
                                            value="<?php echo e($skill->id); ?>"
                                            <?php if(in_array($skill->id, (array) request()->input('job_skills', []))): echo 'checked'; endif; ?>
                                        >
                                        <span class="text-small"><?php echo e($skill->name); ?></span>
                                        <span class="checkmark"></span>
                                    </label>
                                    <span class="number-item"><?php echo e($skill->jobs_count ?: 0); ?></span>
                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                </div>
            <?php endif; ?>
            <?php echo Form::close(); ?>

        </div>
    </div>
</div>
<?php /**PATH /home/icloudcsin/public_html/tngamechangers/platform/themes/jobbox/views/job-board/partials/filters.blade.php ENDPATH**/ ?>