@include('admin.layouts.alert-modal') 
<form method="post" action="{{ request()->url() }}" id="input_form">
	@csrf
    <div class="row">
        <div class="form-group col-lg-6">
            <label>Jumlah Awal <text class="text-danger">*</text></label>
            <input type="text" class="form-control autonumeric-quantity" name="start_count" id="start_count" value="{{ old('start_count') ?? $target->start_count }}">
            <small id="start_count"></small>
        </div>
        <div class="form-group col-lg-6">
            <label>Jumlah Kurang <text class="text-danger">*</text></label>
            <input type="text" class="form-control autonumeric-quantity" name="remains" id="remains" value="{{ old('remains') ?? $target->remains }}">
            <small id="remains"></small>
        </div>
    </div>
    <div class="form-group">
        <label>Status <text class="text-danger">*</text></label>
        <select class="form-control" name="status" id="status" data-toggle="select2">
            <option value="" selected>Pilih...</option>
            @foreach($status_list as $item)
                <option value="{{ $item }}" {{ old('status') ? (old('status') == $item ? 'selected' : '') : ($target->status == $item ? 'selected' : '')  }}>{{ $item }}</option>
            @endforeach
        </select>
        <small id="status"></small>
    </div>
    <hr />
    <div class="button-items d-grid gap-2 hidden" id="process-button">
        <button type="button" class="btn btn-primary btn-block waves-effect waves-light mt-0" disabled>Mohon Tunggu...</button>
    </div>
    <div class="row" id="main-button">
        <div class="col-6">
            <div class="button-items d-grid gap-2">
                <button type="reset" class="btn btn-secondary btn-block waves-effect waves-light mt-0"><i class="mdi mdi-refresh"></i> Reset</button>
            </div>
        </div>
        <div class="col-6">
            <div class="button-items d-grid gap-2">
                <button type="submit" class="btn btn-custom btn-block waves-effect waves-light mt-0"><i class="mdi mdi-send-outline"></i> Submit</button>
            </div>
        </div>
    </div>
</form>
<script src="{{ asset('assets/js/modal-form.js') }}"></script>
<script src="{{ asset('assets/js/app.js') }}"></script>