<?php if (isset($component)) { $__componentOriginal951024bfcf58033c82ac11d797616473 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal951024bfcf58033c82ac11d797616473 = $attributes; } ?>
<?php $component = App\View\Components\UserLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-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\UserLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('Bot History')]); ?>
    <div class="min-h-screen bg-gray-100 dark:bg-gray-900 transition-colors duration-300">
        <div class="py-6">
            <div class="bg-white dark:bg-gray-800 rounded-xl p-4">
                <h2 class="text-xl text-gray-900 dark:text-white mb-4">Trading History</h2>

                <!-- Desktop View -->
                <div class="hidden md:block">
                    <div class="bg-gray-100 dark:bg-[#232F46] bg-opacity-50">
                        <div class="grid grid-cols-5 px-6 py-3">
                            <div class="text-sm text-gray-800 dark:text-gray-400 font-medium">BOT NAME</div>
                            <div class="text-sm text-gray-800 dark:text-gray-400 font-medium">AMOUNT</div>
                            <div class="text-sm text-gray-800 dark:text-gray-400 font-medium">STATUS</div>
                            <div class="text-sm text-gray-800 dark:text-gray-400 font-medium">RESULT</div>
                            <div class="text-sm text-gray-800 dark:text-gray-400 font-medium">PROFIT/LOSS</div>
                        </div>
                    </div>
                    
                    <div class="divide-y divide-gray-700">
                        <?php $__currentLoopData = $trades; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $trade): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="grid grid-cols-5 px-6 py-3">
                                <div class="text-gray-800 dark:text-gray-300"><?php echo e($trade->bot->name); ?></div>
                                <div class="text-gray-800 dark:text-gray-300">$<?php echo e(number_format($trade->amount, 2)); ?></div>
                                <div class="text-gray-500">Completed</div>
                                <div class="<?php echo e($trade->result === 'win' ? 'text-green-500' : 'text-red-500'); ?>">
                                    <?php echo e(ucfirst($trade->result)); ?>

                                </div>
                                <div class="<?php echo e($trade->result === 'win' ? 'text-green-500' : 'text-red-500'); ?>">
                                    <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium <?php echo e($trade->result === 'win' ? 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200' : 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200'); ?>">
                                        <?php echo e($trade->result === 'win' ? '+$'.number_format($trade->profit, 2) : '-$'.number_format($trade->amount, 2)); ?>

                                    </span>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>

                <!-- Mobile View -->
                <div class="md:hidden space-y-4">
                    <?php $__currentLoopData = $trades; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $trade): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="bg-gray-100 dark:bg-[#232F46] p-4 rounded-lg">
                            <div class="flex justify-between items-start mb-3">
                                <h3 class="text-gray-800 dark:text-gray-300 font-medium"><?php echo e($trade->bot->name); ?></h3>
                                <span class="text-gray-500">Completed</span>
                            </div>
                            <div class="grid grid-cols-2 gap-2">
                                <div class="bg-white dark:bg-gray-700/50 p-2 rounded">
                                    <span class="text-gray-800 dark:text-gray-400 text-xs">Amount</span>
                                    <p class="text-gray-800 dark:text-gray-300">$<?php echo e(number_format($trade->amount, 2)); ?></p>
                                </div>
                                <div class="bg-white dark:bg-gray-700/50 p-2 rounded">
                                    <span class="text-gray-800 dark:text-gray-400 text-xs">Result</span>
                                    <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium <?php echo e($trade->result === 'win' ? 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200' : 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200'); ?>">
                                        <?php echo e($trade->result === 'win' ? '+$'.number_format($trade->profit, 2) : '-$'.number_format($trade->amount, 2)); ?>

                                    </span>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>

                <!-- Pagination -->
                <div class="mt-4">
                    <?php echo e($trades->links()); ?>

                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal951024bfcf58033c82ac11d797616473)): ?>
<?php $attributes = $__attributesOriginal951024bfcf58033c82ac11d797616473; ?>
<?php unset($__attributesOriginal951024bfcf58033c82ac11d797616473); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal951024bfcf58033c82ac11d797616473)): ?>
<?php $component = $__componentOriginal951024bfcf58033c82ac11d797616473; ?>
<?php unset($__componentOriginal951024bfcf58033c82ac11d797616473); ?>
<?php endif; ?><?php /**PATH /home/blockcino/public_html/resources/views/user/bots/history.blade.php ENDPATH**/ ?>