<div class="no-break">
<table style="width: 100%">
    <tr>
        <td width="25%" style="vertical-align: top;">Informasi Dinas Tata Ruang
        </td>
        <td width="1%" style="vertical-align: top;">:</td>
        <td style="vertical-align: top;">
            @php
                $informasi = [
                    'peruntukan',
                    'kdb',
                    'kdh',
                    'gsb',
                    'max_lantai',
                    'klb',
                    'gss',
                    'pelebaran_jalan',
                    'nama_petugas',
                ];
            @endphp

            @foreach ($informasi as $key)
                @if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
                    @php
                        $displayKey = ucfirst(str_replace('_', ' ', $key));
                        if (strlen($key) == 3) {
                            $displayKey = strtoupper($key);
                        }
                    @endphp
                    <p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
                @endif
            @endforeach

        </td>
    </tr>

    @if (!empty($forminspeksi['fakta']['keterangan']))
        <tr>
            <td width="25%" style="vertical-align: top;">Catatan yang Perlu
                Diperhatikan</td>
            <td width="1%" style="vertical-align: top;">:</td>
            <td style="vertical-align: top;">
                @php
                    $keterangan = $forminspeksi['fakta']['keterangan'] ?? '';
                    if (is_array($keterangan)) {
                        $keterangan = implode(', ', array_filter($keterangan));
                    }
                @endphp

                @if (!empty($keterangan))
                    <table style="width: 100%; border-collapse: collapse;">
                        <tr>
                            <td>{!! nl2br(e($keterangan)) !!}</td>

                        </tr>
                    </table>
                @endif
            </td>
        </tr>
    @endif
</table>
</div>
