<?php $__env->startSection('title', 'View Subcategory'); ?>
<?php $__env->startSection('page-title', 'View Subcategory'); ?>

<?php $__env->startSection('content'); ?>
<div class="bg-white dark:bg-gray-950 rounded-lg shadow-lg border border-gray-200 dark:border-gray-800 p-6 mb-6">
    <div class="flex items-center justify-between mb-6">
        <h3 class="text-2xl font-bold text-gray-900 dark:text-white"><?php echo e($subcategory->name); ?></h3>
        <div class="flex space-x-2">
            <a href="<?php echo e(route('admin.subcategories.edit', $subcategory)); ?>" 
               class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg transition-colors">
                <i class="fas fa-edit mr-2"></i>Edit
            </a>
            <a href="<?php echo e(route('admin.subcategories.index')); ?>" 
               class="px-4 py-2 bg-gray-500 dark:bg-gray-700 hover:bg-gray-600 dark:hover:bg-gray-600 text-white font-semibold rounded-lg transition-colors">
                Back
            </a>
        </div>
    </div>

    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
        <div>
            <h4 class="text-lg font-semibold mb-4 text-gray-900 dark:text-white">Subcategory Information</h4>
            <dl class="space-y-2">
                <div>
                    <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Name (Khmer)</dt>
                    <dd class="text-sm text-gray-900 dark:text-white"><?php echo e($subcategory->name_km ?? 'N/A'); ?></dd>
                </div>
                <div>
                    <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Code</dt>
                    <dd class="text-sm text-gray-900 dark:text-white"><?php echo e($subcategory->code); ?></dd>
                </div>
                <?php if($subcategory->parent): ?>
                    <div>
                        <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Parent Category</dt>
                        <dd class="text-sm text-gray-900 dark:text-white font-medium"><?php echo e($subcategory->parent->name); ?></dd>
                    </div>
                <?php endif; ?>
                <div>
                    <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Products</dt>
                    <dd class="text-sm text-gray-900 dark:text-white"><?php echo e($subcategory->products->count()); ?></dd>
                </div>
            </dl>
        </div>

        <div>
            <h4 class="text-lg font-semibold mb-4 text-gray-900 dark:text-white">Description</h4>
            <p class="text-sm text-gray-700 dark:text-gray-300 mb-4"><?php echo e($subcategory->description ?? 'No description'); ?></p>
            <h4 class="text-lg font-semibold mb-4 text-gray-900 dark:text-white">Description (Khmer)</h4>
            <p class="text-sm text-gray-700 dark:text-gray-300"><?php echo e($subcategory->description_km ?? 'No description'); ?></p>
        </div>
    </div>

    <?php if($subcategory->image): ?>
        <div class="mt-6">
            <h4 class="text-lg font-semibold mb-4 text-gray-900 dark:text-white">Image</h4>
            <img src="<?php echo e($subcategory->image); ?>" alt="<?php echo e($subcategory->name); ?>" 
                 class="max-w-md h-64 object-cover rounded-lg border border-gray-200 dark:border-gray-800 shadow-md">
        </div>
    <?php endif; ?>
</div>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mac/Documents/e-com/resources/views/admin/subcategories/show.blade.php ENDPATH**/ ?>