{{-- Inhaltskarte der Bibliothek (Programm, Modul, Film, Material). Die ganze Karte ist ein Link, der Titel trägt den Linktext. Bild: nur ein vorhandenes, für das Konto freigegebenes Vorschaubild; sonst ein ruhiger Platzhalter mit der Inhaltsart. Zusätze: Modulzahl, Zeitbedarf, Verfügbarkeit, „Verwendet in“ bei Medien, die in mehreren Programmen stehen. --}} @props(['card']) @php $type = $card['type']; $kindLabel = $card['kind'] ?? match ($type) { 'programm' => 'Programm', 'modul' => 'Modul', 'film' => 'Film', default => 'Material', }; $usedIn = array_values($card['used_in'] ?? []); $placeholderIcon = match ($type) { 'programm' => 'squares-2x2', 'modul' => 'rectangle-stack', 'film' => 'play-circle', default => 'document-text', }; @endphp
class(['mb-card', 'mb-card-'.$type]) }}>
@if (filled($card['image_url'] ?? null)) {{ $card['image'] ?: '' }} @else @endif @if ($type === 'film') @endif

{{ $card['title'] }}

@if (filled($card['summary'] ?? null))

{{ $card['summary'] }}

@endif
    @if (($card['module_count'] ?? 0) > 0)
  • {{ $card['module_count'] }} {{ $card['module_count'] === 1 ? 'Modul' : 'Module' }}
  • @endif @if (! empty($card['duration_minutes']))
  • @endif @if (count($usedIn) > 1)
  • in {{ count($usedIn) }} Programmen und Modulen
  • @endif @if (count($card['versions'] ?? []) > 1)
  • in unterschiedlichen Fassungen
  • @endif @unless ($card['hide_status'] ?? false)
  • @endunless
@if (filled($card['error'] ?? null))

{{ $card['error'] }}

@endif