<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'tags',
    'lang' => null,
    'limit' => 15
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'tags',
    'lang' => null,
    'limit' => 15
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<?php
    $lang = $lang ?? (request()->route('lang') ?? config('drama.default_home_language'));
?>

<!--[if BLOCK]><![endif]--><?php if(!empty($tags) && count($tags)): ?>
    <div class="flex justify-center gap-2 flex-wrap mb-8">
        <!--[if BLOCK]><![endif]--><?php $__currentLoopData = collect($tags)->take($limit); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <!--[if BLOCK]><![endif]--><?php if(!empty($tag)): ?>
                <?php
                    // Only slug if tag contains Latin letters, else use rawurlencode on original tag
                    if (preg_match('/[a-zA-Z]/', $tag)) {
                        $slug = \Illuminate\Support\Str::slug($tag);
                    } else {
                        $slug = $tag;
                    }
                    $encodedSlug = rawurlencode($slug);
                ?>
                <a href="<?php echo e(route('tag.page', ['lang' => $lang, 'tag' => $encodedSlug])); ?>" class="bg-zinc-700 px-3 py-1 rounded-full text-sm hover:bg-zinc-600 transition-colors"><?php echo e($tag); ?></a>
            <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
    </div>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
<?php /**PATH /Users/buchin/Repos/dracin-git/resources/views/components/tag-list.blade.php ENDPATH**/ ?>