<?php $__env->startSection('header', 'View Message'); ?>
<?php $__env->startSection('content'); ?>
<div class="bg-white rounded shadow p-6">
    <div class="mb-4">
        <h3 class="text-lg font-bold text-gray-900">From: <?php echo e($message->name); ?></h3>
        <p class="text-sm text-gray-500"><?php echo e($message->email); ?> <?php if($message->phone): ?> | <?php echo e($message->phone); ?> <?php endif; ?></p>
        <p class="text-sm text-gray-500">Received: <?php echo e($message->created_at->format('M d, Y H:i A')); ?></p>
    </div>
    
    <?php if($message->subject): ?>
    <div class="mb-4">
        <strong class="text-gray-700">Subject:</strong> <?php echo e($message->subject); ?>

    </div>
    <?php endif; ?>

    <div class="bg-gray-50 p-4 rounded-md border text-gray-800 whitespace-pre-wrap"><?php echo e($message->message); ?></div>

    <div class="mt-6 flex justify-between">
        <a href="<?php echo e(route('admin.messages.index')); ?>" class="bg-gray-200 text-gray-700 px-4 py-2 rounded">Back to Messages</a>
        <form action="<?php echo e(route('admin.messages.destroy', $message)); ?>" method="POST" onsubmit="return confirm('Delete this message?');">
            <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
            <button type="submit" class="bg-red-600 text-white px-4 py-2 rounded hover:bg-red-700">Delete Message</button>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/sumankc/Desktop/ Websites/Dr Rajan/resources/views/admin/messages/show.blade.php ENDPATH**/ ?>