<?php
Breadcrumbs::for('home', function ($trail) {
    $trail->push(__('Home'), route('home'));
});

Breadcrumbs::for('pengurusan-cuti', function ($trail) {
    $trail->parent('home');
    $trail->push(__('Pengurusan Cuti'));
});

Breadcrumbs::for('pengurusan-permohonan', function ($trail) {
    $trail->parent('home');
    $trail->push(__('Pengurusan Permohonan'));
});

Breadcrumbs::for('panduan-pengguna', function ($trail) {
    $trail->parent('home');
    $trail->push(__('Panduan Pengguna'));
});

Breadcrumbs::for('ecuti::quota.index', function ($trail) {
    $trail->parent('pengurusan-cuti');
    $trail->push(__('Maklumat Cuti'), route('ecuti::quota.index'));
});

Breadcrumbs::for('ecuti::applications.index', function ($trail) {
    $trail->parent('pengurusan-cuti');
    $trail->push(__('Senarai Permohonan Cuti'), route('ecuti::applications.index'));
});

Breadcrumbs::for('ecuti::applications.cancellist', function ($trail) {
    $trail->parent('pengurusan-cuti');
    $trail->push(__('Senarai Permohonan Cuti'), route('ecuti::applications.cancellist'));
});


Breadcrumbs::for('ecuti::applications.detail', function ($trail) {
    $trail->parent('ecuti::applications.index');
    $trail->push(__('Maklumat Pemohon'), route('ecuti::applications.detail',['lid' => 1,'actionid' =>collect(request()->segments())->last()]));
});

Breadcrumbs::for('ecuti::applyform.index', function ($trail) {
    $trail->parent('pengurusan-cuti');
    $trail->push(__('Permohonan Cuti Rehat'), route('ecuti::applyform.index'));
});

Breadcrumbs::for('ecuti::applyform.medicalleave', function ($trail) {
    $trail->parent('pengurusan-cuti');
    $trail->push(__('Permohonan Cuti Sakit'), route('ecuti::applyform.medicalleave'));
});

Breadcrumbs::for('ecuti::cancel.apply', function ($trail) {
    $trail->parent('pengurusan-cuti');
    $trail->push(__('Permohonan Batal Cuti'), route('ecuti::cancel.apply'));
});

Breadcrumbs::for('ecuti::action.index', function ($trail) {
    $trail->parent('pengurusan-permohonan');
    $trail->push(__('Tindakan'), route('ecuti::action.index',['id' => collect(request()->segments())->last()]));

});

Breadcrumbs::for('ecuti::action.detail', function ($trail) {
    $trail->parent('ecuti::action.index');
    $trail->push(__('Maklumat Pemohon'), route('ecuti::action.detail',['lid' => 1,'actionid' =>collect(request()->segments())->last()]));
});

Breadcrumbs::for('ecuti::action.sokong', function ($trail) {
    $trail->parent('ecuti::action.detail');
    $trail->push(__('Skrin Sokong'), route('ecuti::action.detail',['lid' => 1,'actionid' =>collect(request()->segments())->last()]));
});


Breadcrumbs::for('ecuti::dashboard.manual', function ($trail) {
    $trail->parent('panduan-pengguna');

});

