@props([ 'assets', 'variant' => 'banner', 'title' => 'Twój sprzęt (inwentarz)', 'selectable' => false, 'selectAction' => 'selectSnipeitAsset', 'selectedId' => null, // false when embedded inside a caller-provided card (e.g. the operator's // "Przeszukaj inwentarz" search box + results in one container) — skips // this component's own wrapping card/title so the two don't nest. 'card' => true, ]) @php $isSidebar = $variant === 'sidebar'; @endphp @if (count($assets)) @if ($card)
@if ($isSidebar)
{{ $title }}
@else
devices {{ $title }}
@endif @endif
@foreach ($assets as $a) @php $isSelected = $selectedId === $a['id']; @endphp
devices {{ $a['label'] }} @if (! empty($a['category'])) {{ $a['category'] }} @endif @if ($selectable) @if ($isSelected) check_circle Powiązano @else @endif @endif
@endforeach
@if ($card)
@endif @endif