@if(data_get($titleStyle, 'visible', true))
{{ str_replace(["\r\n","\n"], ' ', (data_get($cardSetting, 'title.text', 'KARTU ANGGOTA'))) }}
@endif
@if(data_get($cardSetting, 'name.visible', false))
{{ $user->name ?? '-' }}
@endif
@if(data_get($cardSetting, 'number.visible', false))
No. Anggota: {{ $anggota->nomor_anggota ?? '-' }}
@endif
@if($photoBase64 && data_get($photoStyle, 'visible', true))
@endif
@if(data_get($cardSetting, 'email.visible', false))
{{ $user->email ?? '-' }}
@endif
@if(data_get($cardSetting, 'no_hp.visible', false))
{{ $profile->no_hp ?? '-' }}
@endif
@if(data_get($cardSetting, 'jenis_kelamin.visible', false))
{{ $profile->jenis_kelamin ?? '-' }}
@endif
@if(data_get($cardSetting, 'pekerjaan.visible', false))
{{ $profile->pekerjaan ?? '-' }}
@endif
@if(data_get($cardSetting, 'jabatan.visible', false))
{{ $profile->jabatan ?? '-' }}
@endif
@if(data_get($cardSetting, 'alamat.visible', false))
{{ $profile->alamat ?? '-' }}
@endif
@if(data_get($cardSetting, 'province.visible', false))
{{ $province ?? '-' }}
@endif
@if(data_get($cardSetting, 'regency.visible', false))
{{ $regency ?? '-' }}
@endif
@if(data_get($cardSetting, 'district.visible', false))
{{ $district ?? '-' }}
@endif
@if(data_get($cardSetting, 'date.visible', false))
Bergabung: {{ $anggota->tanggal_bergabung ? $anggota->tanggal_bergabung->format('d/m/Y') : '-' }}
@endif
@if(data_get($qrStyle, 'visible', true))
@php
// Prioritaskan nomor anggota, jika tidak ada baru gunakan ID
$qrData = !empty($anggota->nomor_anggota) ? $anggota->nomor_anggota : ($user->id ?? '');
$qrSvg = \SimpleSoftwareIO\QrCode\Facades\QrCode::size($qrSize)->generate($qrData);
$qrBase64 = base64_encode($qrSvg);
@endphp
@endif