<div class="row mb-2 align-items-center">
    <label class="col-form-label col-md-4 text-md-end">Аватар</label>
    <div class="col-md-8 avatars-select mb-3 d-flex justify-content-start flex-wrap">
        @foreach($avatars as $avatar)
            @php($avatar->path = basename($avatar->path))
            @php($disabled = ($avatar->experience > $user?->experience ))
            <div class="text-center p-1">

                <input  type="radio" @disabled($disabled)
                        class="form-check-input mt-2 visually-hidden" name="avatar"
                        id="avatar-{{ $avatar->id }}" value="{{ $avatar->id }}" @checked($avatar->path == ($user?->avatar ?? 'default.png'))>
                <label for="avatar-{{ $avatar->id }}"
                       class="d-block @if($disabled) disabled @endif {{ ($avatar->path == $user?->avatar) ? 'current' : '' }}"
                       title="Необходимый опыт: {{ $avatar->experience }}">
                    <img class="img-fluid rounded-circle" style="background-color: {{ $user->bg_color ?? '#55def7' }}" src="{{ asset('images/avatars/' . $avatar->path) }}" alt="{{ $avatar->id }}">
                </label>
            </div>
        @endforeach
    </div>
</div>
