@extends('server-side.layouts.server-app')
@section('pageTitle', 'Edit Data Gejala | KlinikSapi.Go')
@section('mainContent')
    <div class="content d-flex flex-column flex-column-fluid" id="kt_content">
        <div class="toolbar" id="kt_toolbar">
            <div id="kt_toolbar_container" class="container-fluid d-flex flex-stack">
                <div data-kt-swapper="true" data-kt-swapper-mode="prepend"
                    data-kt-swapper-parent="{default: '#kt_content_container', 'lg': '#kt_toolbar_container'}"
                    class="page-title d-flex align-items-center flex-wrap me-3 mb-5 mb-lg-0">
                    <h1 class="d-flex align-items-center text-dark fw-bolder fs-3 my-1">Manajemen Data
                        <span class="h-20px border-gray-200 border-start ms-3 mx-2"></span>
                        <small class="text-muted fs-7 fw-bold my-1 ms-1">Gejala / Data Gejala / Edit Gejala</small>
                    </h1>
                </div>
            </div>
        </div>
        <div class="post d-flex flex-column-fluid" id="kt_post">
            <div id="kt_content_container" class="container-xxl">
                <div class="card mb-5 mb-xl-8 px-10 px-lg-15 py-15">
                    <form action="{{ route('gejala.update', $gejala->gejalaId) }}" method="POST" class="form" autocomplete="off">
                        @csrf
                        @method('PUT')
                        <div class="mb-10">
                            <h1 class="mb-3">Formulir Perubahan Data Gejala</h1>
                            <div class="text-muted fw-bold fs-5">Silahkan lengkapi formulir perubahan <strong>Data Gejala</strong> di bawah ini!</div>
                        </div>
                        <div class="row g-9 mb-8">
                            <div class="col-md-12 fv-row">
                                <label class="d-flex align-items-center fs-6 fw-bold mb-2">
                                    <span class="required">Kode Gejala</span>
                                </label>
                                <input type="text" class="form-control form-control-solid" name="gejalaId" value="{{ $gejala->gejalaId }}" readonly />
                            </div>
                            <div class="col-md-12 fv-row">
                                <label class="d-flex align-items-center fs-6 fw-bold mb-2">
                                    <span class="required">Nama Gejala</span>
                                </label>
                                <input type="text" class="form-control form-control-solid" name="gejala" value="{{ old('gejala', $gejala->gejala) }}" />
                                @if ($errors->has('gejala'))
                                    <p class="mt-2 text-sm" style="color: red; font-weight: 500;"><span
                                            class="font-medium">Oops!</span> {{ $errors->first('gejala') }}</p>
                                @endif
                            </div>
                        </div>
                        <div class="float-start">
                            <button type="submit" class="btn btn-primary">
                                <span class="indicator-label">Simpan Perubahan</span>
                            </button>
                            <a href="{{ route('gejala.index') }}" class="btn btn-light me-3">Batal</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
