@include('backend-inquiro/header_iv')
<main class = "container mt-0 mt-lg-5">
    <div class = "row justify-content-center">
        <div class="card shadow-lg">
            <div class = "mb-5 pb-5">
                <div id = "buscadorFeriados" class="row justify-content-center align-items-center pt-3 pt-xxl-5 ">
                    <div class = "col-12 col-lg-6 my-2 my-xxl-5 align-items-center">
                        <h2 id = "tituloFer" class = "text-center my-5 pt-0 pt-xxl-5 text-fidelitas">Feriados por pais</h2>
                        <form id ="busqueda_feriado" action="/" method="POST">
                            <input type="hidden" name="_token" value="{{ csrf_token() }}">
                            <div class = "row justify-content-center">
                                <div class="col-3">
                                    <!--- Selector de año y pais --->
                                    <label class="form-label text-muted" for="fechaLabel">Año</label>
                                    <select id="fechaLabel" name="year" class="form-select datos-fecha">
                                        <option>---</option>
                                        @foreach ( $years as $year )
                                            <option>{{ $year }}</option>
                                        @endforeach
                                    </select>
                                </div>
                                <div class="col-3">
                                    <label class="form-label text-muted" for="paisLabel">Pais</label>
                                    <select id = "paisLabel" name="pais" class="form-select datos-pais">
                                        <option value="">---</option>
                                        @foreach( $paises as $pais ) 
                                        <option id = 'paisElegido' value="{{ $pais->country_code }}">{{ $pais->nombre_pais }}</option>
                                        @endforeach                                                                                
                                    </select>
                                </div>
                                <div class = "col-3">                                    
                                    <button id = "botonForm" type="button" class="btn btn-fidelitas my-4" event = "">Aceptar</button>
                                </div>
                          </div>
                        </form>
                    </div>    
                </div>                       
              <div id = "obtenerCalendario"></div>
            </div>
        </div>
    </div>
</main>
<script type="text/javascript" src="{{ URL::asset('/js/feriados/buscar_feriados.js') }}?v={{ rand() }}"> </script>
<script>
$(document).ready(function(){    
    mostrarSeccionCalendario();
    nuevoFeriado();
});
</script>

