@extends('layouts.main')

@section('breadcrumbs')
    {{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@php
    // $route = Route::currentRouteName();
    // dd($route);
    $route = explode('.', Route::currentRouteName());
@endphp

@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">

        <form id="{{$route[0]}}_form" name="{{$route[0]}}_form" method="POST">
            <input type="hidden" id="id" name="id" value="{{ $id }}">
            @method('PUT')
            @csrf
                    <div class="card border border-agi-100 pb-2.5">
                        <div class="card-header bg-agi-50" id="basic_settings">
                            <h3 class="card-title">
                                Tambah Registrasi
                            </h3>
                            <div class="flex items-center gap-2">
                                <a href="{{ route('registrasi.show', $id) }}" class="btn btn-xs btn-primary" title="Detail"><i class="ki-filled ki-abstract-26"></i> Detail</a>
                                <a href="{{ route('registrasi.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
                            </div>
                        </div>
                        <div class="card-body grid gap-5">
                            <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    No. registrasi
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <label class="card-title" id="textReg">
                                        No. registrasi
                                    </label>
                                </div>
                            </div>
                            <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Tindakan
                                </label>
                                <div class="flex gap-12">
                                    <label class="form-label flex items-center gap-2.5 text-nowrap">
                                        <input class="radio" name="{{$route[0]}}_tindakan" type="radio" value="0" id="{{ $route[0] }}_tindakan_yes"/>
                                        Yes
                                    </label>&nbsp;&nbsp;
                                    <label class="form-label flex items-center gap-2.5 text-nowrap">
                                        <input class="radio" name="{{$route[0]}}_tindakan" type="radio" value="1" id="{{ $route[0] }}_tindakan_no" />
                                       No
                                    </label>
                                </div>
                            </div>
                            <div id="{{$route[0]}}_div_jenis_pilihan" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Data Jenis Penilaian (Pilihan registrasi)
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <select class="inputku select" id="{{$route[0]}}_jenis_penilaian" name="{{$route[0]}}_jenis_penilaian">
                                        <option></option>
                                    </select>
                                    <em id="{{$route[0]}}_jenis_penilaian_msg" class="alert text-danger text-sm"></em>
                                </div>
                            </div>
                            <div id="{{ $route[0] }}_div_catatan" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Catatan
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <textarea class="inputku textarea" name="{{$route[0]}}_catatan" id="{{$route[0]}}_catatan" placeholder="Catatan..." rows="6"></textarea>
                                    <em id="{{$route[0]}}_catatan_msg" class="alert text-danger text-sm"></em>
                                </div>
                            </div>

                            <div id="{{ $route[0] }}_div_region" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Region
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <select class="inputku select" id="{{$route[0]}}_region" name="{{$route[0]}}_region">
                                        <option></option>
                                    </select>
                                    <em id="{{$route[0]}}_region_msg" class="alert text-danger text-sm"></em>
                                </div>
                            </div>
                            <div id="{{ $route[0] }}_div_jenis_laporan" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Jenis Laporan
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <select class="inputku select" id="jenis_laporan" name="jenis_laporan">
                                        <option value="sederhana">Sederhana</option>
                                        <option value="standar">Standar</option>
                                    </select>
                                    <em id="jenis_laporan_msg" class="alert text-danger text-sm"></em>
                                </div>
                            </div>
                            <div id="{{ $route[0] }}_div_catatan2" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Catatan
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <textarea class="inputku textarea" name="{{$route[0]}}_catatan2" id="{{$route[0]}}_catatan2" placeholder="Catatan..." rows="6"></textarea>
                                    <em id="{{$route[0]}}_catatan2_msg" class="alert text-danger text-sm"></em>
                                </div>
                            </div>
                            <div class="flex justify-end">
                                <button type="button" class="btn btn-primary" id="toEdit">
                                    Save
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
</div>
@endsection
@include('lpj::registrasi.js.editjs')
