<?php
require_once __DIR__.'/../includes/db.php';
require_once __DIR__.'/../includes/auth.php';
include __DIR__.'/../includes/header.php';

$surat = [
    ['SURAT KETERANGAN TIDAK MAMPU','ri-hand-coin-line','Untuk bantuan sosial & administrasi','tidak_mampu'],
    ['SURAT KETERANGAN DOMISILI','ri-map-pin-line','Domisili penduduk','domisili'],
    ['SURAT KETERANGAN HILANG','ri-error-warning-line','Keterangan kehilangan','hilang'],
    ['SURAT KETERANGAN IJIN KERAMAIAN','ri-store-2-line','Untuk izin kegiatan masyarakat','ijin_keramaian'],
    ['SURAT KETERANGAN PINDAH','ri-truck-line','Surat pindah penduduk','pindah'],
    ['SURAT KETERANGAN MERANTAU','ri-plane-line','Keterangan perantauan warga','merantau'],
    ['SURAT KETERANGAN PENGHASILAN','ri-money-dollar-circle-line','Keterangan penghasilan keluarga','penghasilan_ortu'],
    ['SURAT KETERANGAN USAHA','ri-store-2-line','Bukti usaha warga','usaha'],
    ['SURAT KUASA','ri-file-paper-2-line','Surat kuasa resmi','kuasa'],
    ['SURAT PENGANTAR KAYU','ri-tree-line','Pengantar kayu','pengantar_kayu'],
    ['UNDANGAN','ri-mail-send-line','Undangan kegiatan desa','undangan'],
    ['SURAT KETERANGAN AHLI WARIS','ri-user-star-line','Keterangan ahli waris','ahli_waris'],
    ['SURAT PERNYATAAN PEMBAGIAN WARIS','ri-scales-3-line','Pembagian waris','pembagian_waris'],
    ['SURAT KETERANGAN GADAI','ri-exchange-line','Keterangan gadai barang','gadai'],
    ['SURAT BELUM MENIKAH','ri-heart-line','Status belum menikah','belum_menikah'],
    ['SURAT BELUM BEKERJA','ri-briefcase-line','Belum bekerja','belum_bekerja'],
    ['SURAT PENGANTAR HEWAN','ri-bear-smile-line','Pengantar hewan ternak','pengantar_hewan'],
    ['SURAT KELAKUAN BAIK','ri-shield-check-line','Rekam kelakuan warga','kelakuan_baik'],
    ['SURAT PENGANTAR NIKAH','ri-heart-2-line','Pengantar nikah','nikah']
];
?>

<div class="page-hero">
    <div class="page-title">
        <span class="page-title-icon"><i class="ri-file-text-fill"></i></span>
        <div>
            <h1>Surat Desa</h1>
            <p>Pilih jenis surat administrasi desa yang ingin dibuat untuk warga.</p>
        </div>
    </div>
    <div class="page-actions">
        <span class="status-pill blue"><i class="ri-file-list-3-line"></i> <?= count($surat) ?> Jenis Surat</span>
    </div>
</div>

<div class="panel-grid service-grid">
    <?php foreach($surat as $s): ?>
    <div class="info-card service-card">
        <div class="info-card-body">
            <div class="service-icon">
                <i class="<?= esc($s[1]) ?>"></i>
            </div>
            <div class="service-card-title">
                <h3><?= esc($s[0]) ?></h3>
                <p><?= esc($s[2]) ?></p>
            </div>
            <a class="action-btn primary" href="surat_<?= esc($s[3]) ?>.php">
                Buat Surat <i class="ri-arrow-right-line"></i>
            </a>
        </div>
    </div>
    <?php endforeach; ?>
</div>

<?php include __DIR__.'/../includes/footer.php'; ?>
