

<?php $__env->startSection('title', 'Hesaplama Geçmişi'); ?>

<?php $__env->startSection('content'); ?>
<div class="container mx-auto px-4 py-12">
    <div class="max-w-4xl mx-auto">
        <div style="margin-bottom: 24px;">
            <a href="<?php echo e(route('calculators.index')); ?>" style="color: #3b82f6; text-decoration: none; font-weight: 500;">← Hesaplayıcılara Dön</a>
        </div>

        <h1 style="font-size: 32px; font-weight: 700; margin-bottom: 8px; color: #111827;">Hesaplama Geçmişi</h1>
        <p style="font-size: 15px; color: #6b7280; margin-bottom: 32px;">Yaptığınız tüm hesaplamalar burada görüntülenir</p>

        <?php if($calculations->count() > 0): ?>
            <div style="background: white; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb;">
                <div style="overflow-x: auto;">
                    <table style="width: 100%; border-collapse: collapse;">
                        <thead>
                            <tr style="background: #f9fafb; border-bottom: 2px solid #e5e7eb;">
                                <th style="padding: 12px 16px; text-align: left; font-weight: 600; font-size: 13px; color: #6b7280;">Tür</th>
                                <th style="padding: 12px 16px; text-align: left; font-weight: 600; font-size: 13px; color: #6b7280;">Sonuç</th>
                                <th style="padding: 12px 16px; text-align: left; font-weight: 600; font-size: 13px; color: #6b7280;">Tarih</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $calculations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $calc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr style="border-bottom: 1px solid #e5e7eb;">
                                    <td style="padding: 16px;">
                                        <span style="display: inline-block; background: #dbeafe; color: #0369a1; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600;">
                                            <?php echo e(ucfirst(str_replace('_', ' ', $calc->calculator_type))); ?>

                                        </span>
                                    </td>
                                    <td style="padding: 16px; color: #111827;">
                                        <?php if($calc->calculator_type === 'boy_kilo'): ?>
                                            BMI: <?php echo e($calc->result['bmi']); ?> (<?php echo e($calc->result['category']); ?>)
                                        <?php elseif($calc->calculator_type === 'maas'): ?>
                                            ₺<?php echo e(number_format($calc->result['total_salary'], 0, ',', '.')); ?>

                                        <?php elseif($calc->calculator_type === 'kpss'): ?>
                                            <?php echo e($calc->result['final_score']); ?> puan
                                        <?php elseif($calc->calculator_type === 'yas_gorev'): ?>
                                            <?php echo e($calc->result['age']); ?> yaş - <?php echo e($calc->result['eligible'] ? '✓ Uygun' : '✗ Uygun Değil'); ?>

                                        <?php endif; ?>
                                    </td>
                                    <td style="padding: 16px; color: #6b7280; font-size: 13px;">
                                        <?php echo e($calc->created_at->format('d.m.Y H:i')); ?>

                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
            </div>

            <?php if($calculations->hasPages()): ?>
                <div style="margin-top: 24px; display: flex; justify-content: center;">
                    <?php echo e($calculations->links()); ?>

                </div>
            <?php endif; ?>
        <?php else: ?>
            <div style="background: #f9fafb; border-radius: 12px; padding: 40px; text-align: center; border: 1px solid #e5e7eb;">
                <p style="font-size: 15px; color: #6b7280; margin-bottom: 16px;">Henüz hesaplama yapmamışsınız.</p>
                <a href="<?php echo e(route('calculators.index')); ?>" style="color: #3b82f6; text-decoration: none; font-weight: 500;">Hesaplama yapmak için tıklayın →</a>
            </div>
        <?php endif; ?>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.public', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\askeribilgiler\resources\views\calculators\history.blade.php ENDPATH**/ ?>