{{--
    Odalama panosundaki tek yolcu kartı (sürüklenebilir).
    Beklenen: $p (RoomingService::passengerCard), $sale (pano satırı), $uid, $roomId
--}}
<div class="rmg-pax" draggable="true"
     data-sale="{{ $sale['sale_id'] }}"
     data-passenger="{{ $p['passenger_id'] }}"
     data-room="{{ $roomId ?? '' }}"
     data-bed="{{ $p['occupies_bed'] ? 1 : 0 }}">
    <span class="rmg-pax-av {{ $p['gender'] === 'female' ? 'f' : ($p['gender'] === 'male' ? 'm' : '') }}">{{ $p['initials'] }}</span>
    <div class="rmg-pax-txt">
        <b>{{ $p['name'] }}</b>
        <small>
            @if($p['pax_type'])<span class="rmg-tag {{ $p['pax_type'] === 'Bebek' ? 'baby' : '' }}">{{ $p['pax_type'] }}</span>@endif
            @if($p['age'] !== null){{ $p['age'] }} yaş@endif
            @if($p['gender_label'])<span class="rmg-dot"></span>{{ $p['gender_label'] }}@endif
            @if(!$p['occupies_bed'])<span class="rmg-tag baby" title="Bebekler yatak kapasitesine sayılmaz">yataksız</span>@endif
        </small>
    </div>
    {{-- Dokunmatik / klavye yolu: sürüklemeye alternatif oda seçimi --}}
    <select class="rmg-move" title="Odaya taşı" aria-label="Odaya taşı">
        <option value="">Atanmamış</option>
        @foreach($sale['rooms'] as $r)
            <option value="{{ $r['id'] }}" @selected((string) $r['id'] === (string) ($roomId ?? ''))>{{ $r['label'] }}</option>
        @endforeach
    </select>
</div>
