<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-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\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex justify-between items-center">
            <h2 class="font-semibold text-xl text-gray-800 leading-tight">
                <?php echo e(__('Inquiry Details')); ?>

            </h2>
            <a href="<?php echo e(route('inquiries.index')); ?>" class="text-gray-600 hover:text-gray-800">
                ← Back to Inquiries
            </a>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-12">
        <div class="max-w-4xl mx-auto sm:px-6 lg:px-8">

            <?php if(session('success')): ?>
                <div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative mb-4">
                    <?php echo e(session('success')); ?>

                </div>
            <?php endif; ?>

            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6 text-gray-900">
                    <!-- Header with status and type -->
                    <div class="flex justify-between items-start mb-6 pb-6 border-b">
                        <div>
                            <h1 class="text-2xl font-bold text-gray-800"><?php echo e($inquiry->subject); ?></h1>
                            <p class="text-gray-500 mt-1">Received on <?php echo e($inquiry->created_at->format('M d, Y \a\t g:i A')); ?></p>
                        </div>
                        <div class="flex gap-2">
                            <span class="px-3 py-1 text-sm font-semibold rounded-full
                                <?php echo e($inquiry->type === 'contact' ? 'bg-blue-100 text-blue-800' : ''); ?>

                                <?php echo e($inquiry->type === 'quote' ? 'bg-green-100 text-green-800' : ''); ?>

                                <?php echo e($inquiry->type === 'product' ? 'bg-purple-100 text-purple-800' : ''); ?>

                                <?php echo e($inquiry->type === 'career' ? 'bg-orange-100 text-orange-800' : ''); ?>

                            ">
                                <?php echo e(ucfirst($inquiry->type)); ?>

                            </span>
                            <span class="px-3 py-1 text-sm font-semibold rounded-full <?php echo e($inquiry->status === 'unread' ? 'bg-yellow-100 text-yellow-800' : 'bg-green-100 text-green-800'); ?>">
                                <?php echo e(ucfirst($inquiry->status)); ?>

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

                    <!-- Contact Information -->
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                        <div>
                            <label class="block text-xs uppercase text-gray-500 font-semibold mb-1">Name</label>
                            <p class="text-gray-800 font-medium"><?php echo e($inquiry->name); ?></p>
                        </div>
                        <div>
                            <label class="block text-xs uppercase text-gray-500 font-semibold mb-1">Email</label>
                            <p class="text-gray-800">
                                <a href="mailto:<?php echo e($inquiry->email); ?>" class="text-blue-600 hover:underline"><?php echo e($inquiry->email); ?></a>
                            </p>
                        </div>
                        <?php if($inquiry->phone): ?>
                        <div>
                            <label class="block text-xs uppercase text-gray-500 font-semibold mb-1">Phone</label>
                            <p class="text-gray-800">
                                <a href="tel:<?php echo e($inquiry->phone); ?>" class="text-blue-600 hover:underline"><?php echo e($inquiry->phone); ?></a>
                            </p>
                        </div>
                        <?php endif; ?>
                        <?php if($inquiry->quantity): ?>
                        <div>
                            <label class="block text-xs uppercase text-gray-500 font-semibold mb-1">Quantity</label>
                            <p class="text-gray-800 font-medium"><?php echo e($inquiry->quantity); ?></p>
                        </div>
                        <?php endif; ?>
                    </div>

                    <!-- Message -->
                    <div class="mb-6 pb-6 border-b">
                        <label class="block text-xs uppercase text-gray-500 font-semibold mb-2">Message</label>
                        <div class="bg-gray-50 p-4 rounded-lg text-gray-800 whitespace-pre-wrap">
                            <?php echo e($inquiry->message); ?>

                        </div>
                    </div>

                    <!-- Actions -->
                    <div class="flex gap-2">
                        <?php if($inquiry->status === 'unread'): ?>
                            <form action="<?php echo e(route('inquiries.mark-read', $inquiry)); ?>" method="POST" class="inline">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('PATCH'); ?>
                                <button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700">
                                    Mark as Read
                                </button>
                            </form>
                        <?php else: ?>
                            <form action="<?php echo e(route('inquiries.mark-unread', $inquiry)); ?>" method="POST" class="inline">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('PATCH'); ?>
                                <button type="submit" class="bg-gray-600 text-white px-4 py-2 rounded-md hover:bg-gray-700">
                                    Mark as Unread
                                </button>
                            </form>
                        <?php endif; ?>

                        <form action="<?php echo e(route('inquiries.destroy', $inquiry)); ?>" method="POST" onsubmit="return confirm('Are you sure?');" class="inline">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button type="submit" class="bg-red-600 text-white px-4 py-2 rounded-md hover:bg-red-700">
                                Delete
                            </button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\dayana\admin\resources\views/inquiries/show.blade.php ENDPATH**/ ?>