<?php $__env->startSection('content'); ?>
    
    <div class="w-full min-h-screen bg-[#f4f4f4]" x-data="{ showCreatePostModal: false }">
        <div class="md:max-w-[80%] max-w-[90%] mx-auto px-4 py-6">

            
            <div class="mb-6 flex flex-col gap-6">
                <div class="flex items-center justify-between">
                    <div>
                        <h1 class="text-2xl font-bold text-[#2F3D7E]">Salary Feed</h1>
                        <p class="text-sm text-gray-500">Real, anonymous salary data from the community.</p>
                    </div>
                </div>

                
                <div class="bg-white rounded-xl shadow-sm border border-gray-200 p-4">
                    <div class="flex gap-3 mb-3">
                         
                         <div class="w-12 h-12 shrink-0">
                            <img 
                                src="https://ui-avatars.com/api/?name=<?php echo e(urlencode($user->name)); ?>&background=2F3D7E&color=fff" 
                                alt="<?php echo e($user->name); ?>" 
                                class="w-full h-full rounded-full object-cover"
                            >
                         </div>

                         
                         <button 
                            @click="showCreatePostModal = true"
                            class="flex-1 text-left bg-white border border-gray-300 hover:bg-gray-50 rounded-full px-5 py-3 text-gray-500 font-medium transition-colors cursor-pointer block"
                        >
                            Start a post
                         </button>
                    </div>
                </div>
            </div>

            
            <div class="sticky top-4 z30 space-y-4" x-data>
                <form action="<?php echo e(route('dashboard.index')); ?>" method="GET" id="filterForm">

                    
                    <div class="bg-white rounded-xl shadow-sm border border-gray-200 p-3 flex flex-col sm:flex-row gap-3 mb-4">

                        
                        <div class="relative flex-1">
                            <svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
                            <input 
                                type="text" 
                                name="search" 
                                value="<?php echo e(request('search')); ?>"
                                placeholder="Search role, company, or skill..." 
                                class="w-full pl-10 pr-4 py-2 bg-gray-50 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#2F3D7E]/20 focus:border-[#2F3D7E]"
                            >
                        </div>

                        
                        <div class="flex gap-2 overflow-x-auto pb-1 sm:pb-0">

                            
                            <select name="country" onchange="document.getElementById('filterForm').submit()" 
                                class="px-3 py-2 bg-white border border-gray-200 rounded-lg text-sm text-gray-700 focus:outline-none focus:ring-2 focus:ring-[#2F3D7E]/20 focus:border-[#2F3D7E] cursor-pointer min-w-[120px]">
                                <option value="">Country</option>
                                <?php $__currentLoopData = $filterOptions['countries']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($country); ?>" <?php echo e(request('country') == $country ? 'selected' : ''); ?>><?php echo e($country); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>

                            
                            <select name="job_title" onchange="document.getElementById('filterForm').submit()" 
                                class="px-3 py-2 bg-white border border-gray-200 rounded-lg text-sm text-gray-700 focus:outline-none focus:ring-2 focus:ring-[#2F3D7E]/20 focus:border-[#2F3D7E] cursor-pointer min-w-[120px]">
                                <option value="">Job Title</option>
                                <?php $__currentLoopData = $filterOptions['titles']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $title): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($title); ?>" <?php echo e(request('job_title') == $title ? 'selected' : ''); ?>><?php echo e($title); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>

                            
                            <select name="experience" onchange="document.getElementById('filterForm').submit()" 
                                class="px-3 py-2 bg-white border border-gray-200 rounded-lg text-sm text-gray-700 focus:outline-none focus:ring-2 focus:ring-[#2F3D7E]/20 focus:border-[#2F3D7E] cursor-pointer min-w-[120px]">
                                <option value="">Experience</option>
                                <?php $__currentLoopData = $filterOptions['experience_levels']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $exp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($exp); ?>" <?php echo e(request('experience') == $exp ? 'selected' : ''); ?>><?php echo e($exp); ?> Years</option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>

                            
                            <?php if(request()->anyFilled(['search', 'location', 'job_title', 'experience'])): ?>
                                <a href="<?php echo e(route('dashboard.index')); ?>" class="px-3 py-2 bg-red-50 text-red-600 rounded-lg text-sm font-medium hover:bg-red-100 flex items-center">
                                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
                                </a>
                            <?php endif; ?>
                        </div>
                    </div>

                    
                    <div class="bg-white p-1.5 rounded-xl shadow-sm border border-gray-200 inline-flex w-full sm:w-auto overflow-x-auto">
                        <?php $currentTab = request('tab', 'all'); ?>

                        <button type="submit" name="tab" value="all" 
                            class="px-4 py-2 rounded-lg text-sm font-medium transition-all whitespace-nowrap <?php echo e($currentTab === 'all' ? 'bg-[#2F3D7E] text-white shadow-sm' : 'text-gray-600 hover:bg-gray-50'); ?>">
                            All Posts
                        </button>
                        <button type="submit" name="tab" value="community" 
                            class="px-4 py-2 rounded-lg text-sm font-medium transition-all whitespace-nowrap <?php echo e($currentTab === 'community' ? 'bg-[#2F3D7E] text-white shadow-sm' : 'text-gray-600 hover:bg-gray-50'); ?>">
                            My Communities
                        </button>
                        <button type="submit" name="tab" value="verified" 
                            class="px-4 py-2 rounded-lg text-sm font-medium transition-all whitespace-nowrap <?php echo e($currentTab === 'verified' ? 'bg-[#2F3D7E] text-white shadow-sm' : 'text-gray-600 hover:bg-gray-50'); ?>">
                            Highest Verified
                        </button>
                        <button type="submit" name="tab" value="recent" 
                            class="px-4 py-2 rounded-lg text-sm font-medium transition-all whitespace-nowrap <?php echo e($currentTab === 'recent' ? 'bg-[#2F3D7E] text-white shadow-sm' : 'text-gray-600 hover:bg-gray-50'); ?>">
                            Most Recent
                        </button>
                    </div>

                </form>
            </div>

            
            <div class="mt-6 space-y-6">
                <?php $__empty_1 = true; $__currentLoopData = $rateMyPayPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php if (isset($component)) { $__componentOriginalf67cc910806948b4e12240e2cb6b07b3 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf67cc910806948b4e12240e2cb6b07b3 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.network.post-card','data' => ['post' => $post]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('network.post-card'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['post' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($post)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf67cc910806948b4e12240e2cb6b07b3)): ?>
<?php $attributes = $__attributesOriginalf67cc910806948b4e12240e2cb6b07b3; ?>
<?php unset($__attributesOriginalf67cc910806948b4e12240e2cb6b07b3); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf67cc910806948b4e12240e2cb6b07b3)): ?>
<?php $component = $__componentOriginalf67cc910806948b4e12240e2cb6b07b3; ?>
<?php unset($__componentOriginalf67cc910806948b4e12240e2cb6b07b3); ?>
<?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div class="text-center py-20 bg-white rounded-xl border border-gray-200">
                        <div class="w-16 h-16 bg-gray-100 rounded-xl flex items-center justify-center mx-auto mb-4">
                            <svg class="w-8 h-8 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
                        </div>
                        <h3 class="text-lg font-medium text-gray-900">No posts found</h3>
                        <p class="text-gray-500 mt-1 max-w-sm mx-auto">We couldn't find any salary data matching your filters. Try adjusting your search.</p>
                        <a href="<?php echo e(route('dashboard.index')); ?>" class="mt-4 inline-block text-[#2F3D7E] font-semibold hover:underline">Clear all filters</a>
                    </div>
                <?php endif; ?>

                
                <?php if($rateMyPayPosts->hasPages()): ?>
                    <div class="mt-6">
                        <?php echo e($rateMyPayPosts->links()); ?>

                    </div>
                <?php elseif($rateMyPayPosts->count() > 0): ?>
                    <div class="text-center py-10">
                        <p class="text-gray-400 text-sm">You've reached the end of the list.</p>
                        <a href="<?php echo e(route('communities.index')); ?>" class="text-[#2F3D7E] text-sm font-semibold mt-2 hover:underline">Join more communities</a>
                    </div>
                <?php endif; ?>
            </div>
        </div>

        
        <?php if (isset($component)) { $__componentOriginala61466f58c7c350444c7fe62481b1705 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala61466f58c7c350444c7fe62481b1705 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.network.create-post-modal','data' => ['experiences' => $experiences,'communities' => $communities]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('network.create-post-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['experiences' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($experiences),'communities' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($communities)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala61466f58c7c350444c7fe62481b1705)): ?>
<?php $attributes = $__attributesOriginala61466f58c7c350444c7fe62481b1705; ?>
<?php unset($__attributesOriginala61466f58c7c350444c7fe62481b1705); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala61466f58c7c350444c7fe62481b1705)): ?>
<?php $component = $__componentOriginala61466f58c7c350444c7fe62481b1705; ?>
<?php unset($__componentOriginala61466f58c7c350444c7fe62481b1705); ?>
<?php endif; ?>

    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dashboard', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/ratemypay/resources/views/dashboard/index.blade.php ENDPATH**/ ?>