@extends('layouts.main')

@section('breadcrumbs')
	{{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@php
	// $route = Route::currentRouteName();
	// dd($route); registrasi.show
	$route = explode('.', Route::currentRouteName());
@endphp
@section('content')
	<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
		<div class="card">
			<div class="card-header bg-agi-50" id="advanced_settings_appearance">
				<h3 class="card-title">
					Data Permohonan
				</h3>

				<div class="flex items-center gap-2">
					<a href="{{ route('registrasifinal.edit', $id) }}" class="btn btn-xs btn-primary" title="Register Final"><i class="ki-filled ki-arrow-circle-right"></i> Registrasi Final</a>
					<a href="{{ route('registrasifinal.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
				</div>
			</div>
			<div class="card-body lg:py-7.5 grid grid-cols-3">
				<div class="mb-5">
					<h3 class="text-md font-medium text-gray-900">
						Nomor Register Permohonan:
					</h3>
					<span class="text-2sm text-gray-700">
						{{ $permohonan->nomor_registrasi }}
					</span>
				</div>

				<div class="mb-5">
					<h3 class="text-md font-medium text-gray-900">
						Pemohon:
					</h3>
					<span class="text-2sm text-gray-700">
						{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
					</span>
				</div>

				<div class="mb-5">
					<h3 class="text-md font-medium text-gray-900">
						Tujan Permohonan:
					</h3>
					<span class="text-2sm text-gray-700">
						{{ $permohonan->tujuanPenilaian->name }} {!! $permohonan->pdfSPK_path !!}
					</span>
				</div>

                <div class="mb-5">
                    <h3 class="text-md font-medium text-gray-900">
                        Nilai Plafond:
                    </h3>
                    <span class="text-2sm text-gray-700">
                        {{ $permohonan->nilaiPlafond->name }}
                    </span>
                </div>

                <div class="mb-5">
                    <h3 class="text-md font-medium text-gray-900">
                        Status Bayar:
                    </h3>
                    <span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
                        {{ str_replace('_',' ',$permohonan->status_bayar) }}
                    </span>
                </div>
			</div>
		</div>

        @include('lpj::component.detail-jaminan',['backLink' => 'registrasifinal.index','hidePermohonan'=>true])
	</div>

@endsection
