<?php $__env->startSection('title', 'تفاصيل طلب AI'); ?>
<?php $__env->startSection('heading', 'تفاصيل طلب الذكاء الاصطناعي'); ?>
<?php $__env->startSection('subheading'); ?>
    الطلب #<?php echo e($request->id); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="mb-6 flex flex-wrap items-center gap-4">
        <a href="<?php echo e(route('admin.ai-requests.index')); ?>" class="text-sm font-medium text-teal-700 hover:underline">← العودة إلى القائمة</a>
        <?php if($request->user): ?>
            <a href="<?php echo e(route('admin.users.show', $request->user)); ?>" class="text-sm font-medium text-zinc-600 hover:underline">عرض المستخدم</a>
        <?php endif; ?>
    </div>

    <div class="grid gap-6 lg:grid-cols-3">
        <div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm lg:col-span-1">
            <h2 class="mb-4 text-base font-bold text-zinc-900">معلومات</h2>
            <dl class="space-y-3 text-sm">
                <div>
                    <dt class="text-xs text-zinc-500">المعرف</dt>
                    <dd class="font-mono font-medium"><?php echo e($request->id); ?></dd>
                </div>
                <div>
                    <dt class="text-xs text-zinc-500">المستخدم</dt>
                    <dd>
                        <?php if($request->user): ?>
                            <a href="<?php echo e(route('admin.users.show', $request->user)); ?>" class="font-medium text-teal-700 hover:underline"><?php echo e($request->user->username); ?></a>
                        <?php else: ?>
                            —
                        <?php endif; ?>
                    </dd>
                </div>
                <div>
                    <dt class="text-xs text-zinc-500">الحالة</dt>
                    <dd><span class="rounded-full bg-zinc-100 px-2 py-0.5 text-xs font-medium"><?php echo e($request->status); ?></span></dd>
                </div>
                <div>
                    <dt class="text-xs text-zinc-500">الرموز</dt>
                    <dd class="font-mono"><?php echo e($request->tokens_used); ?></dd>
                </div>
                <div>
                    <dt class="text-xs text-zinc-500">تاريخ الإنشاء</dt>
                    <dd><?php echo e($request->created_at?->format('Y-m-d H:i:s')); ?></dd>
                </div>
            </dl>
        </div>

        <div class="space-y-6 lg:col-span-2">
            <div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm">
                <h2 class="mb-3 text-base font-bold text-zinc-900">المطالبة (Prompt)</h2>
                <pre class="max-h-[28rem] overflow-auto whitespace-pre-wrap break-words rounded-xl bg-zinc-50 p-4 text-sm leading-relaxed text-zinc-800"><?php echo e($request->prompt); ?></pre>
            </div>
            <div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm">
                <h2 class="mb-3 text-base font-bold text-zinc-900">الرد (Response)</h2>
                <pre class="max-h-[28rem] overflow-auto whitespace-pre-wrap break-words rounded-xl bg-zinc-50 p-4 text-sm leading-relaxed text-zinc-800"><?php echo e($request->response ?? '—'); ?></pre>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\madar-backend\resources\views\admin\ai-requests\show.blade.php ENDPATH**/ ?>