<form method="POST" action="<?php echo e($action); ?>" class="space-y-6">
    <?php echo csrf_field(); ?>
    <?php if($method === 'PUT'): ?>
        <?php echo method_field('PUT'); ?>
    <?php endif; ?>

    <div class="bg-white rounded-xl border border-gray-100 p-6 space-y-4">
        <div>
            <label class="block text-sm font-medium text-gray-700 mb-1">Name</label>
            <input name="name" value="<?php echo e(old('name', $blogCategory->name ?? '')); ?>" required class="w-full px-4 py-2.5 border border-gray-300 rounded-lg text-sm">
        </div>
        <div>
            <label class="block text-sm font-medium text-gray-700 mb-1">Slug</label>
            <input name="slug" value="<?php echo e(old('slug', $blogCategory->slug ?? '')); ?>" class="w-full px-4 py-2.5 border border-gray-300 rounded-lg text-sm">
        </div>
        <div>
            <label class="block text-sm font-medium text-gray-700 mb-1">Description</label>
            <textarea name="description" rows="4" class="w-full px-4 py-2.5 border border-gray-300 rounded-lg text-sm"><?php echo e(old('description', $blogCategory->description ?? '')); ?></textarea>
        </div>
        <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
            <div>
                <label class="block text-sm font-medium text-gray-700 mb-1">Sort Order</label>
                <input type="number" min="0" name="sort_order" value="<?php echo e(old('sort_order', $blogCategory->sort_order ?? 0)); ?>" class="w-full px-4 py-2.5 border border-gray-300 rounded-lg text-sm">
            </div>
            <div class="flex items-center justify-between border border-gray-200 rounded-lg px-4 py-2.5">
                <label class="text-sm font-medium text-gray-700">Active</label>
                <input type="checkbox" name="is_active" value="1" <?php echo e(old('is_active', $blogCategory->is_active ?? true) ? 'checked' : ''); ?>>
            </div>
        </div>
    </div>

    <div class="flex gap-3">
        <button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white font-semibold text-sm px-6 py-2.5 rounded-lg">
            <?php echo e($method === 'PUT' ? 'Update Category' : 'Create Category'); ?>

        </button>
        <a href="<?php echo e(route('admin.blog-categories.index')); ?>" class="bg-gray-100 hover:bg-gray-200 text-gray-700 font-semibold text-sm px-6 py-2.5 rounded-lg">Cancel</a>
    </div>
</form>
<?php /**PATH C:\xampp\htdocs\gps-migration\resources\views\admin\blog-categories\_form.blade.php ENDPATH**/ ?>