<?php

use Diglactic\Breadcrumbs\Breadcrumbs;
use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail;

if (!Breadcrumbs::exists('basicdata')) {
    Breadcrumbs::for('basicdata', function (BreadcrumbTrail $trail) {
        $trail->push('Basic Data');
    });
}

Breadcrumbs::for('basicdata.custom-field', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Custom Field', route('basicdata.custom-field.index'));
});

Breadcrumbs::for('basicdata.custom-field.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.custom-field');
    $trail->push('Tambah Custom Field', route('basicdata.custom-field.create'));
});

Breadcrumbs::for('basicdata.custom-field.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.custom-field');
    $trail->push('Edit Custom Field');
});


Breadcrumbs::for('basicdata.jenis-fasilitas-kredit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Jenis Fasilitas Kredit', route('basicdata.jenis-fasilitas-kredit.index'));
});

Breadcrumbs::for('basicdata.jenis-fasilitas-kredit.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-fasilitas-kredit');
    $trail->push('Tambah Jenis Fasilitas Kredit', route('basicdata.jenis-fasilitas-kredit.create'));
});

Breadcrumbs::for('basicdata.jenis-fasilitas-kredit.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-fasilitas-kredit');
    $trail->push('Edit Jenis Fasilitas Kredit');
});

Breadcrumbs::for('basicdata.jenis-legalitas-jaminan', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Jenis Legalitas Jaminan', route('basicdata.jenis-legalitas-jaminan.index'));
});

Breadcrumbs::for('basicdata.jenis-legalitas-jaminan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-legalitas-jaminan');
    $trail->push('Tambah Jenis Legalitas Jaminan', route('basicdata.jenis-legalitas-jaminan.create'));
});

Breadcrumbs::for('basicdata.jenis-legalitas-jaminan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-legalitas-jaminan');
    $trail->push('Edit Jenis Legalitas Jaminan');
});

Breadcrumbs::for('basicdata.jenis-jaminan', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Jenis Aset', route('basicdata.jenis-jaminan.index'));
});

Breadcrumbs::for('basicdata.jenis-jaminan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-jaminan');
    $trail->push('Tambah Jenis Aset', route('basicdata.jenis-jaminan.create'));
});

Breadcrumbs::for('basicdata.jenis-jaminan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-jaminan');
    $trail->push('Edit Jenis Aset');
});

Breadcrumbs::for('basicdata.jenis_laporan', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Jenis Laporan', route('basicdata.jenis_laporan.index'));
});

Breadcrumbs::for('basicdata.jenis_laporan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis_laporan');
    $trail->push('Tambah Jenis Laporan', route('basicdata.jenis_laporan.create'));
});

Breadcrumbs::for('basicdata.jenis_laporan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis_laporan');
    $trail->push('Edit Jenis Laporan');
});

Breadcrumbs::for('basicdata.tujuan-penilaian', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Tujuan Penilaian', route('basicdata.tujuan-penilaian.index'));
});

Breadcrumbs::for('basicdata.tujuan-penilaian.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.tujuan-penilaian');
    $trail->push('Tambah Tujuan Penilaian', route('basicdata.tujuan-penilaian.create'));
});

Breadcrumbs::for('basicdata.tujuan-penilaian.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.tujuan-penilaian');
    $trail->push('Edit Tujuan Penilaian');
});

Breadcrumbs::for('basicdata.tujuan_penilaian_kjpp', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Tujuan Penilaian KJPP', route('basicdata.tujuan_penilaian_kjpp.index'));
});

Breadcrumbs::for('basicdata.tujuan_penilaian_kjpp.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.tujuan_penilaian_kjpp');
    $trail->push('Tambah Tujuan Penilaian KJPP', route('basicdata.tujuan_penilaian_kjpp.create'));
});

Breadcrumbs::for('basicdata.tujuan_penilaian_kjpp.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.tujuan_penilaian_kjpp');
    $trail->push('Edit Tujuan Penilaian KJPP');
});

Breadcrumbs::for('basicdata.jenis-dokumen', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Jenis Dokumen', route('basicdata.jenis-dokumen.index'));
});

Breadcrumbs::for('basicdata.jenis-dokumen.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-dokumen');
    $trail->push('Tambah Jenis Dokumen', route('basicdata.jenis-dokumen.create'));
});

Breadcrumbs::for('basicdata.jenis-dokumen.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-dokumen');
    $trail->push('Edit Jenis Dokumen');
});


Breadcrumbs::for('basicdata.nilai-plafond', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Nilai Plafond', route('basicdata.nilai-plafond.index'));
});

Breadcrumbs::for('basicdata.nilai-plafond.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.nilai-plafond');
    $trail->push('Tambah Nilai Plafond', route('basicdata.nilai-plafond.create'));
});

Breadcrumbs::for('basicdata.nilai-plafond.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.nilai-plafond');
    $trail->push('Edit Nilai Plafond');
});

Breadcrumbs::for('basicdata.hubungan-pemilik-jaminan', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Hubungan Pemilik Jaminan', route('basicdata.hubungan-pemilik-jaminan.index'));
});

Breadcrumbs::for('basicdata.hubungan-pemilik-jaminan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.hubungan-pemilik-jaminan');
    $trail->push('Tambah Hubungan Pemilik Jaminan', route('basicdata.hubungan-pemilik-jaminan.create'));
});

Breadcrumbs::for('basicdata.hubungan-pemilik-jaminan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.hubungan-pemilik-jaminan');
    $trail->push('Edit Hubungan Pemilik Jaminan');
});

Breadcrumbs::for('basicdata.hubungan-penghuni-jaminan', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Hubungan Penghuni Jaminan', route('basicdata.hubungan-penghuni-jaminan.index'));
});

Breadcrumbs::for('basicdata.hubungan-penghuni-jaminan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.hubungan-penghuni-jaminan');
    $trail->push('Tambah Hubungan Penghuni Jaminan', route('basicdata.hubungan-penghuni-jaminan.create'));
});

Breadcrumbs::for('basicdata.hubungan-penghuni-jaminan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.hubungan-penghuni-jaminan');
    $trail->push('Edit Hubungan Penghuni Jaminan');
});

Breadcrumbs::for('basicdata.arah-mata-angin', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Arah Mata Angin', route('basicdata.arah-mata-angin.index'));
});

Breadcrumbs::for('basicdata.arah-mata-angin.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.arah-mata-angin');
    $trail->push('Tambah Arah Mata Angin', route('basicdata.arah-mata-angin.create'));
});

Breadcrumbs::for('basicdata.arah-mata-angin.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.hubungan-penghuni-jaminan');
    $trail->push('Edit Arah Mata Angin');
});

Breadcrumbs::for('basicdata.status-permohonan', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Status Permohonan', route('basicdata.status-permohonan.index'));
});

Breadcrumbs::for('basicdata.status-permohonan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.status-permohonan');
    $trail->push('Tambah Status Permohonan', route('basicdata.status-permohonan.create'));
});

Breadcrumbs::for('basicdata.status-permohonan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.status-permohonan');
    $trail->push('Edit Status Permohonan');
});

// KJPP
Breadcrumbs::for('basicdata.kjpp', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('KJPP', route('basicdata.kjpp.index'));
});

Breadcrumbs::for('basicdata.kjpp.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.kjpp');
    $trail->push('Tambah KJPP', route('basicdata.kjpp.create'));
});

Breadcrumbs::for('basicdata.kjpp.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.kjpp');
    $trail->push('Edit KJPP');
});

Breadcrumbs::for('basicdata.kjpp.show', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.kjpp');
    $trail->push('Show KJPP');
});
// End KJPP

// Ijin Usaha
Breadcrumbs::for('basicdata.ijin_usaha', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Ijin Usaha', route('basicdata.ijin_usaha.index'));
});

Breadcrumbs::for('basicdata.ijin_usaha.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.ijin_usaha');
    $trail->push('Tambah Ijin Usaha', route('basicdata.ijin_usaha.create'));
});

Breadcrumbs::for('basicdata.ijin_usaha.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.ijin_usaha');
    $trail->push('Edit Ijin Usaha');
});

Breadcrumbs::for('debitur', function (BreadcrumbTrail $trail) {
    $trail->push('Debitur', route('debitur.index'));
});

Breadcrumbs::for('debitur.create', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur');
    $trail->push('Tambah Debitur', route('debitur.create'));
});

Breadcrumbs::for('debitur.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur');
    $trail->push('Data Debitur');
});

Breadcrumbs::for('debitur.jaminan.index', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur');
    $trail->push('Data Jaminan Debitur');
});

Breadcrumbs::for('debitur.jaminan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur.jaminan.index');
    $trail->push('Tambah Data Jaminan Debitur');
});

Breadcrumbs::for('debitur.jaminan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur.jaminan.index');
    $trail->push('Edit Data Jaminan Debitur');
});


Breadcrumbs::for('debitur.pemilik.index', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur');
    $trail->push('Data Pemilik Jaminan Debitur');
});

Breadcrumbs::for('debitur.pemilik.create', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur.pemilik.index');
    $trail->push('Tambah Data Pemilik Jaminan Debitur');
});

Breadcrumbs::for('debitur.pemilik.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('debitur.pemilik.index');
    $trail->push('Edit Data Pemilik Jaminan Debitur');
});

Breadcrumbs::for('permohonan.index', function (BreadcrumbTrail $trail) {
    $trail->push('Permohonan', route('permohonan.index'));
});

Breadcrumbs::for('permohonan.show', function (BreadcrumbTrail $trail) {
    $trail->parent('permohonan.index');
    $trail->push('Show Permohonan');
});


Breadcrumbs::for('permohonan.create', function (BreadcrumbTrail $trail) {
    $trail->parent('permohonan.index');
    $trail->push('Tambah Permohonan', route('permohonan.create'));
});

Breadcrumbs::for('permohonan.create.debitur', function (BreadcrumbTrail $trail) {
    $trail->parent('permohonan.index');
    $trail->push('Tambah Permohonan', route('permohonan.create'));
});

Breadcrumbs::for('permohonan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('permohonan.index');
    $trail->push('Data Permohonan');
});

Breadcrumbs::for('permohonan.show-pembatalan', function (BreadcrumbTrail $trail) {
    $trail->parent('permohonan.index');
    $trail->push('Show Pembatalan Permohonan');
});

Breadcrumbs::for('pembatalan', function (BreadcrumbTrail $trail) {
    $trail->push('Pembatalan', route('pembatalan.index'));
});

Breadcrumbs::for('pembatalan.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('pembatalan');
    $trail->push('Show Pembatalan');
});

Breadcrumbs::for('basicdata.region', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Region', route('basicdata.region.index'));
});
Breadcrumbs::for('basicdata.region.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.region');
    $trail->push('Tambah Region', route('basicdata.region.create'));
});
Breadcrumbs::for('basicdata.region.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.region');
    $trail->push('Edit Region');
});

Breadcrumbs::for('basicdata.teams', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Team', route('basicdata.teams.index'));
});
Breadcrumbs::for('basicdata.teams.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.teams');
    $trail->push('Tambah Team', route('basicdata.teams.create'));
});

Breadcrumbs::for('basicdata.teams.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.teams');
    $trail->push('Edit Team');
});


Breadcrumbs::for('basicdata.jenis-penilaian', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Jenis Penilaian', route('basicdata.jenis-penilaian.index'));
});
Breadcrumbs::for('basicdata.jenis-penilaian.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-penilaian');
    $trail->push('Tambah Jenis Penilaian', route('basicdata.jenis-penilaian.create'));
});

Breadcrumbs::for('basicdata.jenis-penilaian.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-penilaian');
    $trail->push('Edit Jenis Penilaian');
});

Breadcrumbs::for('penilaian', function (BreadcrumbTrail $trail) {
    $trail->push('Penilaian', route('penilaian.index'));
});
Breadcrumbs::for('penilaian.assignment', function (BreadcrumbTrail $trail) {
    $trail->parent('penilaian');
    $trail->push('Assignment');
});

Breadcrumbs::for('authorization.index', function (BreadcrumbTrail $trail) {
    $trail->push('Permohonan', route('authorization.index'));
});

Breadcrumbs::for('authorization.show', function (BreadcrumbTrail $trail) {
    $trail->parent('authorization.index');
    $trail->push('Detail Permohonan');
});

Breadcrumbs::for('activity', function (BreadcrumbTrail $trail) {
    $trail->push('Activity', route('activity.index'));
});

Breadcrumbs::for('activity.show', function (BreadcrumbTrail $trail) {
    $trail->parent('activity');
    $trail->push('Activity activity');
});

Breadcrumbs::for('activity.progres', function (BreadcrumbTrail $trail) {
    $trail->push('Team activity');
});

Breadcrumbs::for('tender', function (BreadcrumbTrail $trail) {
    $trail->push('Tender');
});

Breadcrumbs::for('tender.penawaran', function (BreadcrumbTrail $trail) {
    $trail->parent('tender');
    $trail->push('Data Penawaran', route('tender.penawaran.index'));
});

Breadcrumbs::for('tender.penawaran.show', function (BreadcrumbTrail $trail, $noreg) {
    $trail->parent('tender');
    $trail->push('Detail Penawaran', route('tender.penawaran.show', $noreg));
});

Breadcrumbs::for('tender.penawaran.createPenawaran', function (BreadcrumbTrail $trail, $noreg) {
    $trail->parent('tender.penawaran');
    $trail->push('Tambah Data Penawaran', route('tender.penawaran.createPenawaran', $noreg));
});

Breadcrumbs::for('tender.penawaran.editPenawaran', function (BreadcrumbTrail $trail, $noreg) {
    $trail->parent('tender.penawaran');
    $trail->push('Penawaran Ulang', route('tender.penawaran.editPenawaran', $noreg));
});

Breadcrumbs::for('tender.penawaran.showSuratTender', function (BreadcrumbTrail $trail, $noreg) {
    $trail->parent('tender.penawaran');
    $trail->push('Surat Tender', route('tender.penawaran.showSuratTender', $noreg));
});

Breadcrumbs::for('tender.penawaran.suratTenderKJPP', function (BreadcrumbTrail $trail, $noreg, $id) {
    $trail->parent('tender.penawaran');
    $trail->push('Surat Tender KJPP', route('tender.penawaran.suratTenderKJPP', ['noreg' => $noreg, 'id' => $id]));
});

Breadcrumbs::for('tender.penawaran.showKirimEmail', function (BreadcrumbTrail $trail, $noreg) {
    $trail->parent('tender.penawaran');
    $trail->push('Show Kirim Email Penawaran', route('tender.penawaran.showKirimEmail', $noreg));
});


Breadcrumbs::for('tender.penawaran.ulang', function (BreadcrumbTrail $trail) {
    $trail->parent('tender');
    $trail->push('Data Penawaran Ulang', route('tender.penawaran.ulang.index'));
});

Breadcrumbs::for('surveyor', function (BreadcrumbTrail $trail) {
    $trail->push('Surveyor', route('surveyor.index'));
});
Breadcrumbs::for('surveyor.inspeksi', function (BreadcrumbTrail $trail) {
    $trail->parent('surveyor.show');
    $trail->push('Form Inspeksi');
});

Breadcrumbs::for('surveyor.show', function (BreadcrumbTrail $trail) {
    $trail->parent('surveyor');
    $trail->push('Detail');
});



Breadcrumbs::for('surveyor.denah', function (BreadcrumbTrail $trail) {
    $trail->parent('surveyor.show');
    $trail->push('Denah');
});

Breadcrumbs::for('surveyor.foto', function (BreadcrumbTrail $trail) {
    $trail->parent('surveyor.show');
    $trail->push('Form Foto');
});

Breadcrumbs::for('surveyor.data-pembanding', function (BreadcrumbTrail $trail) {
    $trail->parent('surveyor.show');
    $trail->push('Form Pembanding');
});

Breadcrumbs::for('otorisator.pelaporan.index', function (BreadcrumbTrail $trail) {
    $trail->parent('otorisator');
    $trail->push('Otorisator', route('otorisator.pelaporan.index'));
});
Breadcrumbs::for('otorisator.view-laporan', function (BreadcrumbTrail $trail) {

    $trail->push('Otorisator Pelaporan');
});


// basic data surveyor
$basicDataRoutes = [
    'bentuk-tanah'           => 'Bentuk Tanah',
    'kontur-tanah'           => 'Kontur Tanah',
    'posisi-kavling'         => 'Posisi Kavling',
    'ketinggian-tanah'       => 'Ketinggian Tanah',
    'kondisi-fisik-tanah'    => 'Kondisi Fisik Tanah',
    'jenis-bangunan'         => 'Jenis Bangunan',
    'kondisi-bangunan'       => 'Kondisi Bangunan',
    'sifat-bangunan'         => 'Sifat Bangunan',
    'spek-bangunan'          => 'Speksifikasi Bangunan',
    'spek-kategori-bangunan' => 'Speksifikasi Kategori Bangunan',
    'sarana-pelengkap'       => 'Sarana Pelengkap',
    'lalu-lintas-lokasi'     => 'Lalu Lintas',
    'tingkat-keramaian'      => 'Tingkat Keramaian',
    'gol-mas-sekitar'        => 'Golongan Masyarakat Sekitar',
    'lantai-unit'            => 'Lantai Unit',
    'view-unit'              => 'View Unit',
    'bentuk-unit'            => 'Bentuk unit',
    'perkerasan-jalan'       => 'Perkerasan jalan',
    'jenis-pesawat'          => 'Jenis pesawat',
    'model-alat-berat'       => 'Model Alat Berat',
    'jenis-kapal'            => 'Jenis kapal',
    'jenis-kendaraan'        => 'Jenis kendaraan',
    'jenis-unit'             => 'Jenis unit',
    'terletak-area'          => 'Terletak di Area',
    'merupakan-daerah'       => 'Merupakan Daerah',
    'posisi-unit'            => 'Posisi unit',
    'bentuk-unit'            => 'Bentuk unit',
    'fasilitas-objek'        => 'Fasilitas Umum Dekat Objek',
    'foto-objek-jaminan'     => 'Foto Objek Jaminan',
    'perizinan'     => 'Perizinan',
];


foreach ($basicDataRoutes as $route => $title) {
    Breadcrumbs::for("basicdata.{$route}", function (BreadcrumbTrail $trail) use ($route, $title) {
        $trail->parent('basicdata');
        $trail->push($title, route("basicdata.{$route}.index"));
    });
}

Breadcrumbs::for('basicdata.createData', function (BreadcrumbTrail $trail, $type = null) {
    $trail->parent('basicdata');

    if ($type) {
        $title = $basicDataRoutes[$type] ?? ucwords(str_replace('-', ' ', $type));
        $trail->push("Tambah $title");
    } else {
        $trail->push("Tambah Data");
    }
});


Breadcrumbs::for('basicdata.editData', function (BreadcrumbTrail $trail, $type = null) {
    $trail->parent('basicdata');

    if ($type) {
        $title = $basicDataRoutes[$type] ?? ucwords(str_replace('-', ' ', $type));
        $trail->push("Edit $title");
    } else {
        $trail->push("Edit Data");
    }
});


// otorisator surveyor
$otorisatorSurveyor = [
    'pelaporan'  => 'Pelaporan',
    'pembayaran' => 'Pembayaran',
    'pembatalan' => 'Pembatalan',
    'sla'        => 'SLA',
    'paparan' => 'Paparan'
];

foreach ($otorisatorSurveyor as $route => $title) {
    Breadcrumbs::for("otorisator.{$route}", function (BreadcrumbTrail $trail) use ($route, $title) {
        $trail->push($title, route("otorisator.{$route}.index"));
    });
}

Breadcrumbs::for('otorisator.show', function (BreadcrumbTrail $trail, $id, $type) {
    $trail->push("Detail $type", route('otorisator.show', ['id' => $id, 'type' => $type]));
});


Breadcrumbs::for('laporan', function (BreadcrumbTrail $trail) {
    $trail->push('Laporan', '');
});

Breadcrumbs::for('laporan.sederhana.index', function (BreadcrumbTrail $trail) {
    $trail->parent('laporan');
    $trail->push('Sederhana', route('laporan.sederhana.index'));
});

Breadcrumbs::for('laporan.standard.index', function (BreadcrumbTrail $trail) {
    $trail->parent('laporan');
    $trail->push('Standard', route('laporan.standard.index'));
});

Breadcrumbs::for('resume', function (BreadcrumbTrail $trail) {
    $trail->push('Resume', route('resume.index'));
});

Breadcrumbs::for('resume.show', function (BreadcrumbTrail $trail) {
    $trail->parent('resume');
    $trail->push('Detail');
});

Breadcrumbs::for('penilai', function (BreadcrumbTrail $trail) {
    $trail->push('Penilai', route('penilai.index'));
});

Breadcrumbs::for('penilai.show', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai');
    $trail->push('Detail Penilaian');
});

Breadcrumbs::for('penilai.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai');
    $trail->push('Upload File Paparan');
});

Breadcrumbs::for('penilai.showDataPembanding', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai');
    $trail->push('Form Pembanding');
});


Breadcrumbs::for('penilai.standar', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('Standard');
});

Breadcrumbs::for('penilai.sederhana', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('Sederhana');
});

Breadcrumbs::for('penilai.memo', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('Memo');
});

Breadcrumbs::for('penilai.resume', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('Resume');
});

Breadcrumbs::for('penilai.lampiran', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('Lampiran Foto dan Dokument');
});

Breadcrumbs::for('penilai.paparan', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('Paparan');
});
Breadcrumbs::for('penilai.rap', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('RAP');
});

Breadcrumbs::for('penilai.call-report', function (BreadcrumbTrail $trail) {
    $trail->parent('penilai.show');
    $trail->push('Call Report');
});


Breadcrumbs::for('sla', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('SLA', route('basicdata.sla.index'));
});


Breadcrumbs::for('persetujuan-penawaran', function (BreadcrumbTrail $trail) {
    $trail->push('Persetujuan Penawaran', route('persetujuan-penawaran.index'));
});

Breadcrumbs::for('persetujuan-penawaran.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('persetujuan-penawaran');
    $trail->push('Proses Persetujuan Penawaran');
});

Breadcrumbs::for('noc', function (BreadcrumbTrail $trail) {
    $trail->push('NOC', route('noc.index'));
});

Breadcrumbs::for('noc.show', function (BreadcrumbTrail $trail) {
    $trail->push('NOC', route('noc.index'));
});

Breadcrumbs::for('noc.pembayaran', function (BreadcrumbTrail $trail) {
    $trail->push('NOC Pembayaran', route('noc.pembayaran.index'));
});

Breadcrumbs::for('noc.penyelesaian', function (BreadcrumbTrail $trail) {
    $trail->push('NOC Penyelesaian', route('noc.penyelesaian.index'));
});

Breadcrumbs::for('noc.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('noc');
    $trail->push('Proses NOC');
});

Breadcrumbs::for('laporan-external', function (BreadcrumbTrail $trail) {
    $trail->push('Laporan External', route('laporan-external.index'));
});

Breadcrumbs::for('laporan-external.show', function (BreadcrumbTrail $trail) {
    $trail->parent('laporan-external');
    $trail->push('Show Laporan External');
});


Breadcrumbs::for('laporan-external.create', function (BreadcrumbTrail $trail) {
    $trail->parent('laporan-external');
    $trail->push('Tambah Laporan External', route('laporan-external.create'));
});


Breadcrumbs::for('laporan-external.edit', function (BreadcrumbTrail $trail) {
    $trail->parent('laporan-external');
    $trail->push('Data Laporan External');
});

Breadcrumbs::for('basicdata.jenis-lampiran', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata');
    $trail->push('Jenis Lampiran', route('basicdata.jenis-lampiran.index'));
});

Breadcrumbs::for('basicdata.jenis-lampiran.create', function (BreadcrumbTrail $trail) {
    $trail->parent('basicdata.jenis-lampiran');
    $trail->push('Tambah Jenis Lampiran', route('basicdata.jenis-lampiran.create'));
});

Breadcrumbs::for('basicdata.jenis-lampiran.edit', function (BreadcrumbTrail $trail, $id) {
    $trail->parent('basicdata.jenis-lampiran');
    $trail->push('Edit Jenis Lampiran', route('basicdata.jenis-lampiran.edit', $id));
});

// Laporan Admin Kredit
Breadcrumbs::for('laporan-admin-kredit', function ($trail) {
    $trail->push('Laporan Admin Kredit', route('admin-kredit.laporan.index'));
});

// Laporan Admin Kredit Laporan SLIK
Breadcrumbs::for('admin-kredit.laporan-slik', function (BreadcrumbTrail $trail) {
    $trail->parent('laporan-admin-kredit');
    $trail->push('Laporan SLIK', route('admin-kredit.laporan-slik.index'));
});

// Laporan Admin Kredit Edit
Breadcrumbs::for('laporan-admin-kredit-edit', function (BreadcrumbTrail $trail, $laporanAdminKredit) {
    $trail->parent('laporan-admin-kredit');
    $trail->push('Edit', route('admin-kredit.laporan.edit', $laporanAdminKredit->id));
});

Breadcrumbs::for('bank-data', function ($trail) {
    $trail->push('Bank Data', route('bank-data.index'));
});

Breadcrumbs::for('laporan-penilai-jaminan', function ($trail) {
    $trail->parent('laporan');
    $trail->push('Laporan Penilai Jaminan', route('laporan-penilai-jaminan.index'));
});

Breadcrumbs::for('laporan-permohonan', function ($trail) {
    $trail->parent('laporan');
    $trail->push('Laporan Permohnan', route('laporan-permohonan.index'));
});

Breadcrumbs::for('laporan-penilaian-jaminan', function ($trail) {
    $trail->parent('laporan');
    $trail->push('Laporan Penilaian Jaminan', route('laporan-penilaian-jaminan.index'));
});

Breadcrumbs::for('laporan-hasil-penilaian-jaminan-internal-external', function ($trail) {
    $trail->parent('laporan');
    $trail->push('Laporan Hasil Penilaian Jaminan Internal External', route('laporan-hasil-penilaian-jaminan-internal-external.index'));
});

Breadcrumbs::for('rekap-harian-so', function ($trail) {
    $trail->push('Rekap Harian');
});


Breadcrumbs::for('laporan-user', function ($trail) {
    $trail->push('Laporan User Pemohonan', route('laporan-user.index'));
});

Breadcrumbs::for('laporan-monitoring', function ($trail) {
    $trail->push('Laporan Monitoring', route('laporan-monitoring.index'));
});

Breadcrumbs::for('laporan-monitoring.show', function ($trail) {
    $trail->parent('laporan-monitoring');
    $trail->push('Detail');
});

Breadcrumbs::for('laporan-debiture', function ($trail) {
    $trail->push('Laporan Debiture', route('laporan-debiture.index'));
});

Breadcrumbs::for('laporan-sla-penilai', function ($trail) {
    $trail->push('Laporan SLA Penilai', route('laporan-sla-penilai.index'));
});


Breadcrumbs::for('memo.index', function (BreadcrumbTrail $trail) {
    $trail->push('Memo Penyelesaian', route('memo.index'));
});

Breadcrumbs::for('memo.show', function (BreadcrumbTrail $trail) {
    $trail->push('Memo Penyelesaian', route('memo.index'));
});

Breadcrumbs::for('memo.create', function (BreadcrumbTrail $trail) {
     $trail->parent('memo.index');
    $trail->push('Create', route('memo.index'));
});

Breadcrumbs::for('memo.preview', function (BreadcrumbTrail $trail) {
    $trail->parent('memo.create');
    $trail->push('Preview', route('memo.index'));
});

// Breadcrumb untuk Bucok
Breadcrumbs::for('bucok', function (BreadcrumbTrail $trail) {
    $trail->push('Data Bucok', route('bucok.index'));
});

Breadcrumbs::for('bucok.show', function (BreadcrumbTrail $trail, $bucok) {
    $trail->parent('bucok');
    $trail->push('Detail Bucok #' . $bucok->nomor_tiket);
});

// Breadcrumb untuk SLIK
Breadcrumbs::for('admin-kredit.slik', function (BreadcrumbTrail $trail) {
    $trail->push('Data SLIK', route('admin-kredit.slik.index'));
});

Breadcrumbs::for('admin-kredit.slik.index', function (BreadcrumbTrail $trail) {
    $trail->parent('admin-kredit.slik');
    $trail->push('Data SLIK', route('admin-kredit.slik.index'));
});

Breadcrumbs::for('admin-kredit.slik.show', function (BreadcrumbTrail $trail, $slik) {
    $trail->parent('admin-kredit.slik');
    $trail->push('Detail SLIK #' . $slik->id, route('admin-kredit.slik.show', $slik));
});

Breadcrumbs::for('admin-kredit.slik.import-form', function (BreadcrumbTrail $trail) {
    $trail->parent('admin-kredit.slik');
    $trail->push('Import Data SLIK', route('admin-kredit.slik.import-form'));
});

Breadcrumbs::for('admin-kredit.laporan-slik.show', function (BreadcrumbTrail $trail, $slik) {
    $trail->parent('admin-kredit.laporan-slik');
    $trail->push('Detail SLIK #' . $slik->id, route('admin-kredit.laporan-slik.show', $slik));
});

// Breadcrumb untuk Daftar Pustaka
Breadcrumbs::for('daftar-pustaka.index', function (BreadcrumbTrail $trail) {
    $trail->push('Daftar Pustaka', route('daftar-pustaka.index'));
});

Breadcrumbs::for('daftar-pustaka.show', function (BreadcrumbTrail $trail, $daftarPustaka) {
    $trail->parent('daftar-pustaka.index');
    $trail->push('Detail Daftar Pustaka', route('daftar-pustaka.show', $daftarPustaka));
});

Breadcrumbs::for('daftar-pustaka.create', function (BreadcrumbTrail $trail) {
    $trail->parent('daftar-pustaka.index');
    $trail->push('Tambah Daftar Pustaka', route('daftar-pustaka.create'));
});

// add andy
require __DIR__ . '/breadcrumbs_registrasi.php';
