<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex justify-between items-center">
            <h2 class="font-semibold text-xl text-gray-800 leading-tight">
                Report Details
            </h2>
            <a href="<?php echo e(route('admin.reports.index')); ?>" class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded">
                Back to Reports
            </a>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-12">
        <div class="max-w-4xl mx-auto sm:px-6 lg:px-8">
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
                <!-- Report Details -->
                <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                    <div class="p-6">
                        <h3 class="text-lg font-semibold text-gray-900 mb-4">Report Information</h3>
                        
                        <div class="space-y-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700">Status</label>
                                <?php
                                    $statusColors = [
                                        'pending' => 'bg-yellow-100 text-yellow-800',
                                        'reviewed' => 'bg-blue-100 text-blue-800',
                                        'resolved' => 'bg-green-100 text-green-800',
                                        'dismissed' => 'bg-gray-100 text-gray-800'
                                    ];
                                ?>
                                <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium <?php echo e($statusColors[$report->status]); ?>">
                                    <?php echo e(ucfirst($report->status)); ?>

                                </span>
                            </div>

                            <div>
                                <label class="block text-sm font-medium text-gray-700">Reported Type</label>
                                <p class="mt-1 text-sm text-gray-900"><?php echo e(ucfirst($report->reportable_type)); ?></p>
                            </div>

                            <div>
                                <label class="block text-sm font-medium text-gray-700">Reason</label>
                                <p class="mt-1 text-sm text-gray-900"><?php echo e(ucwords(str_replace('_', ' ', $report->reason))); ?></p>
                            </div>

                            <div>
                                <label class="block text-sm font-medium text-gray-700">Description</label>
                                <p class="mt-1 text-sm text-gray-900"><?php echo e($report->description ?: 'No description provided'); ?></p>
                            </div>

                            <div>
                                <label class="block text-sm font-medium text-gray-700">Reported By</label>
                                <p class="mt-1 text-sm text-gray-900"><?php echo e($report->reporter ? $report->reporter->name : 'Unknown User'); ?></p>
                            </div>

                            <div>
                                <label class="block text-sm font-medium text-gray-700">Reported At</label>
                                <p class="mt-1 text-sm text-gray-900"><?php echo e($report->created_at->format('M j, Y g:i A')); ?></p>
                            </div>

                            <?php if($report->reviewed_by): ?>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700">Reviewed By</label>
                                    <p class="mt-1 text-sm text-gray-900"><?php echo e($report->reviewedBy ? $report->reviewedBy->name : 'Unknown Admin'); ?></p>
                                </div>

                                <div>
                                    <label class="block text-sm font-medium text-gray-700">Reviewed At</label>
                                    <p class="mt-1 text-sm text-gray-900"><?php echo e($report->reviewed_at ? $report->reviewed_at->format('M j, Y g:i A') : 'Not reviewed'); ?></p>
                                </div>
                            <?php endif; ?>

                            <?php if($report->admin_notes): ?>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700">Admin Notes</label>
                                    <p class="mt-1 text-sm text-gray-900"><?php echo e($report->admin_notes); ?></p>
                                </div>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>

                <!-- Reported Content -->
                <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                    <div class="p-6">
                        <h3 class="text-lg font-semibold text-gray-900 mb-4">Reported <?php echo e(ucfirst($report->reportable_type)); ?></h3>
                        
                        <?php if($reportable): ?>
                            <?php if($report->reportable_type === 'item'): ?>
                                <div class="space-y-4">
                                    <?php if($reportable->primaryPhoto): ?>
                                        <div class="aspect-square w-32 bg-gray-200 rounded-lg overflow-hidden">
                                            <img src="<?php echo e(asset($reportable->primaryPhoto->url)); ?>" alt="<?php echo e($reportable->title); ?>" class="w-full h-full object-cover">
                                        </div>
                                    <?php endif; ?>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Title</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e($reportable->title); ?></p>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Price</label>
                                        <p class="mt-1 text-sm text-gray-900">
                                            <?php if($reportable->price): ?>
                                                $<?php echo e(number_format($reportable->price, 2)); ?>

                                            <?php else: ?>
                                                <?php echo e(ucfirst($reportable->listing_type)); ?>

                                            <?php endif; ?>
                                        </p>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Seller</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e($reportable->user->name); ?></p>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Status</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e(ucfirst($reportable->status)); ?></p>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Description</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e(Str::limit($reportable->description, 200)); ?></p>
                                    </div>
                                    
                                    <a href="<?php echo e(route('items.show', $reportable)); ?>" target="_blank" class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                        View Item
                                        <svg class="ml-2 -mr-0.5 h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path>
                                        </svg>
                                    </a>
                                </div>
                            <?php else: ?>
                                <div class="space-y-4">
                                    <div class="w-16 h-16 bg-gray-300 rounded-full flex items-center justify-center">
                                        <span class="text-gray-600 font-semibold text-lg"><?php echo e(substr($reportable->name, 0, 1)); ?></span>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Name</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e($reportable->name); ?></p>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Email</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e($reportable->email); ?></p>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Status</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e($reportable->is_active ? 'Active' : 'Banned'); ?></p>
                                    </div>
                                    
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700">Joined</label>
                                        <p class="mt-1 text-sm text-gray-900"><?php echo e($reportable->created_at->format('M j, Y')); ?></p>
                                    </div>
                                    
                                    <a href="<?php echo e(route('admin.users.show', $reportable)); ?>" class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                        View User
                                        <svg class="ml-2 -mr-0.5 h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path>
                                        </svg>
                                    </a>
                                </div>
                            <?php endif; ?>
                        <?php else: ?>
                            <p class="text-sm text-gray-500">The reported <?php echo e($report->reportable_type); ?> has been deleted.</p>
                        <?php endif; ?>
                    </div>
                </div>
            </div>

            <!-- Actions -->
            <?php if($report->status === 'pending'): ?>
                <div class="mt-8 bg-white overflow-hidden shadow-sm sm:rounded-lg">
                    <div class="p-6">
                        <h3 class="text-lg font-semibold text-gray-900 mb-4">Take Action</h3>
                        
                        <form method="POST" action="<?php echo e(route('admin.reports.review', $report)); ?>">
                            <?php echo csrf_field(); ?>
                            <div class="space-y-4">
                                <div>
                                    <label for="admin_notes" class="block text-sm font-medium text-gray-700">Admin Notes</label>
                                    <textarea id="admin_notes" name="admin_notes" rows="3" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Optional notes about this review..."></textarea>
                                </div>

                                <div>
                                    <label for="action" class="block text-sm font-medium text-gray-700">Action</label>
                                    <select id="action" name="action" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
                                        <option value="no_action">No Action Required</option>
                                        <?php if($report->reportable_type === 'item'): ?>
                                            <option value="flag_item">Flag Item (Hide from Listings)</option>
                                        <?php endif; ?>
                                        <option value="ban_user">Ban User</option>
                                    </select>
                                </div>

                                <div class="flex space-x-3">
                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                                        Review Report
                                    </button>
                                    
                                    <button type="button" onclick="document.getElementById('resolve-form').submit()" class="inline-flex justify-center py-2 px-4 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                        Mark Resolved
                                    </button>
                                    
                                    <button type="button" onclick="document.getElementById('dismiss-form').submit()" class="inline-flex justify-center py-2 px-4 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                        Dismiss
                                    </button>
                                </div>
                            </div>
                        </form>

                        <form id="resolve-form" method="POST" action="<?php echo e(route('admin.reports.resolve', $report)); ?>" class="hidden">
                            <?php echo csrf_field(); ?>
                        </form>

                        <form id="dismiss-form" method="POST" action="<?php echo e(route('admin.reports.dismiss', $report)); ?>" class="hidden">
                            <?php echo csrf_field(); ?>
                        </form>
                    </div>
                </div>
            <?php endif; ?>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?><?php /**PATH /var/www/html/resources/views/admin/reports/show.blade.php ENDPATH**/ ?>