@props(['size' => 'md', 'model' =>  null])

@php
    $sizeClass = match($size) {
        'sm' => 'px-2 py-1 small',
        'lg' => 'fs-5 px-3 py-2',
        default => 'fs-6 px-2 py-1',
    };
@endphp

<div class="d-flex flex-wrap gap-2">
    @foreach($model->tags as $tag)
        <span style="background-color: {{ $tag->color }}1A; color: {{ $tag->color }}; border: 1px solid {{ $tag->color }};"
              class="badge rounded-pill d-inline-flex align-items-center fw-normal {{ $sizeClass }}">
            {{ $tag->name }}
        </span>
    @endforeach
</div>
