<form class="row g-3 auto-width edit_death_register" id="edit_death_register_form" enctype='multipart/form-data' action="{{route('death-registers-account-update' , $death_registers->id) }}">
    @csrf
    @method('POST')


    <div class="col-md-6">
        <div>
            <label for="death_date" class="form-label"> Death Date </label>
            <input type="date" class="form-control" id="death_date" name="death_date" value="{{$death_registers->death_date}}">
        </div>
    </div>
    <div class="col-md-6">
        <div>
            <label for="death_time" class="form-label"> Death Time </label>
            <input type="time" class="form-control" id="death_time" name="death_time" value="{{$death_registers->death_time}}">
        </div>
    </div>
    <div class="col-md-6">
        <div>
            <label for="guardian_name" class="form-label"> Guardian Name </label>
            <input type="text" class="form-control" id="guardian_name" name="guardian_name" value="{{$death_registers->guardian_name}}">
        </div>
    </div>

    @if(!$ipd_admission)
    <div class="col-md-6">
        <label for="gender_id" class="form-label">Gender</label>
        <select class="form-control" name="gender_id" id="gender_id" required>
            <option value="">Select Gender</option>
            @foreach($genders as $gender)
                <option value="{{ $gender->id }}" {{  $type = ($death_registers->gender_id == $gender->id) ? 'selected' : '' }}>
                    {{ $gender->name }}
                </option>
            @endforeach
        </select>
    </div>
    @endif

     <div class="col-md-6">
        <div>
            <label for="attachment_name" class="form-label"> Attachment</label>
            <input type="file" class="form-control" id="attachment_name" name="attachment_name" value="{{$death_registers->attachment_name}}">
        </div>
    </div>
    <div class="col-md-6">
        <div>
            <label for="death_report" class="form-label"> Report </label>
            <input type="text" class="form-control" id="death_report" name="death_report" value="{{$death_registers->death_report}}">
        </div>
    </div>

    <div class="col-md-6">
        <div>
            <label for="file_url" class="form-label"> File Url </label>
            <input type="text" class="form-control" id="file_url" name="file_url" value="{{$death_registers->file_url}}">
        </div>
    </div>

</form>

<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.10/js/intlTelInput.js"></script>
<script type="text/javascript" src="{{ asset('admin/plugins/datepicker/js/bootstrap-datepicker.js') }}"></script>
<script src="{!! asset('admin/js/accounts.js') !!}"></script>
