
<?php $__env->startSection('title','Offer Purchase Success'); ?>

<?php $__env->startSection('content'); ?>
<?php
    $isSuccess = in_array($purchase->status, ['success','completed','approved']);
    $isFailed  = in_array($purchase->status, ['failed','rejected','cancelled']);

    if ($isFailed) {
        $statusLabel = 'বাতিল/ব্যর্থ';
        $statusColor = 'text-red-500';
    } elseif ($isSuccess) {
        $statusLabel = 'সফল হয়েছে';
        $statusColor = 'text-green-500';
    } else {
        $statusLabel = 'অপেক্ষমান';
        $statusColor = 'text-orange-500';
    }

    $offerName = $purchase->offer->title
        ?? $purchase->offer->name
        ?? 'Offer';

    $amount = (float) $purchase->price;
?>

<div class="min-h-screen bg-[#f5f7fb] flex items-center justify-center px-4 py-10">

    <div class="w-full max-w-sm">
        
        <div class="bg-white rounded-3xl shadow-[0_14px_40px_rgba(0,0,0,0.08)] px-6 py-7 text-center">

            
            <div class="flex justify-center mb-4">
                <div class="h-16 w-16 rounded-full bg-emerald-500 flex items-center justify-center">
                    <svg class="h-8 w-8 text-white" viewBox="0 0 24 24" fill="none">
                        <path d="M5 13l4 4L19 7"
                              stroke="currentColor"
                              stroke-width="2.5"
                              stroke-linecap="round"
                              stroke-linejoin="round" />
                    </svg>
                </div>
            </div>

            
            <h1 class="text-[18px] font-extrabold text-gray-800 leading-tight">
                লেনদেন গ্রহণ করা হয়েছে
            </h1>
            <p class="text-sm text-sky-600 mt-1">
                Offer Purchase
            </p>

            
            <div class="mt-5 bg-white rounded-2xl border border-gray-200 overflow-hidden text-sm text-gray-700">

                
                <div class="flex items-center justify-between px-4 py-2 border-b border-gray-200">
                    <span class="text-gray-600">অফারঃ</span>
                    <span class="font-semibold text-gray-800 text-right">
                        <?php echo e(\Illuminate\Support\Str::limit($offerName, 22)); ?>

                    </span>
                </div>

                
                <div class="flex items-center justify-between px-4 py-2 border-b border-gray-200">
                    <span class="text-gray-600">পরিমাণঃ</span>
                    <span class="font-semibold text-gray-800">
                        ৳<?php echo e(number_format($amount, 2)); ?>

                    </span>
                </div>

                
                <div class="flex items-center justify-between px-4 py-2 border-b border-gray-200">
                    <span class="text-gray-600">নম্বরঃ</span>
                    <span class="font-semibold text-gray-800">
                        <?php echo e($purchase->msisdn); ?>

                    </span>
                </div>

                
                <div class="flex items-center justify-between px-4 py-2 border-b border-gray-200">
                    <span class="text-gray-600">অবস্থাঃ</span>
                    <span class="font-semibold <?php echo e($statusColor); ?>">
                        <?php echo e($statusLabel); ?>

                    </span>
                </div>

                
                <div class="flex items-center justify-between px-4 py-2">
                    <span class="text-gray-600">তারিখঃ</span>
                    <span class="font-semibold text-gray-800">
                        <?php echo e(optional($purchase->created_at)->format('d-m-Y')); ?>

                    </span>
                </div>
            </div>
        </div>

        
        <a href="<?php echo e(route('dashboard')); ?>"
           class="mt-5 block w-full text-center bg-emerald-500 hover:bg-emerald-600 text-white font-semibold text-sm py-3 rounded-full shadow-md transition">
            হোমে ফিরে যান
        </a>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\new-development-re-banking\re_banking_1\resources\views/frontend/offers/purchase_success.blade.php ENDPATH**/ ?>