<div>
    @if(isset($route))
        <form id="filesHistoryForm" class="form-control" action="{{ $route }}" method="POST" enctype="multipart/form-data">
            <div class="container">
                <div class="card">
                    <div class="card-body">
                        <div class="col-auto">
                            <div id="drop-zone" class="drop-zone text-center p-4 border rounded">
                                <p class="mb-2">{{__('com-form-history.titleInputFiles')}}</p>
                                <input type="file" id="file-input" name="fileuploads[]" class="form-control d-none" multiple accept=".pdf, .png, .jpg, .jpeg">
                            </div>
                            <div class="p-3">
                                <div class="alert alert-info text-center">
                                    <div id="file-list">{{__('com-form-history.titleNotInputFiles')}}</div>
                                </div>
                                <div class="text-center">
                                    <button type="submit" class="btn btn-success d-inline-flex align-items-center">
                                        {{__('com-form-history.upload')}}
                                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-arrow-up-fill ml-2" viewBox="0 0 16 16">
                                            <path d="M9.293 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.707A1 1 0 0 0 13.707 4L10 .293A1 1 0 0 0 9.293 0M9.5 3.5v-2l3 3h-2a1 1 0 0 1-1-1M6.354 9.854a.5.5 0 0 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 8.707V12.5a.5.5 0 0 1-1 0V8.707z"/>
                                        </svg>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            @foreach($extraFields as $key => $value)
                <input type="hidden" name="{{$key}}" value="{{$value}}">
            @endforeach
        </form>
    @else 
        <div class="container">
            <div class="card">
                <div class="card-body">
                    <div class="col-auto">
                        <div id="drop-zone" class="drop-zone text-center p-4 border rounded">
                            <p class="mb-2">{{__('com-form-history.titleInputFiles')}}</p>
                            <input type="file" class="filesZone d-none" id="file-input" name="fileuploads[]" class="form-control" multiple accept=".pdf, .png, .jpg, .jpeg">
                        </div>
                        <div class="p-3 text-center">
                            <div class="alert alert-info">
                                <div id="file-list">{{__('com-form-history.titleNotInputFiles')}}</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    @endif
</div>
<script src="{{ asset('js/com-filesmultipleupload.js') }}"></script>
