@extends('layouts.admin')

@section('title', 'Edit Gejala')

@section('content')

<div class="card shadow-sm">
    <div class="card-body">

        <form action="{{ route('gejala.update', $gejala->id) }}" method="POST">
            @csrf
            @method('PUT')

            <!-- KODE -->
            <div class="mb-3">
                <label class="form-label">Kode Gejala</label>
                <input type="text"
                        name="kode"
                        value="{{ $gejala->kode }}"
                        class="form-control"
                        readonly>
            </div>

            <!-- NAMA -->
            <div class="mb-3">
                <label class="form-label">Nama Gejala</label>
                <input type="text" 
                       name="nama" 
                       value="{{ $gejala->nama }}"
                       class="form-control"
                       placeholder="Masukkan gejala"
                       required>
            </div>

            <!-- BUTTON -->
            <div class="mt-3">
                <button type="submit" class="btn btn-success">
                    Update
                </button>

                <a href="{{ route('gejala.index') }}" class="btn btn-secondary">
                    Kembali
                </a>
            </div>

        </form>

    </div>
</div>

@endsection