<nav class="navbar navbar-expand-lg navbar-dark bg-cdark rounded">
    <button class="navbar-toggler collapsed" type="button" data-toggle="collapse"
        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse " id="bs-example-navbar-collapse-1">
        <form class="navbar-form navbar-left" style="width: 100%;" id="form-carrera">
            <div class="row">
                {{ $existe = '' }}
                {{ $existe2 = '' }}
                {{ $existe3 = '' }}
                <div class="col-md-3 col-sm-12">
                    @if (array_key_exists('nombre', $data))
                        @php
                            $existe = $data['nombre'];
                        @endphp
                    @endif
                    <input type="text" id="f_nombre" name="f_nombre" class="form-control form-control-sm"
                        placeholder="Nombre" value="{{ $existe }}">
                </div>
                <div class="col-md-3 col-sm-12">
                    <select name="f_tipo" id="f_tipo" class="form-control form-control-sm">
                        <option value>.:Tipo:.</option>
                        {{ $l = '' }}
                        {{ $m = '' }}
                        @if (array_key_exists('tipo', $data))
                            @if ($data['tipo'] == 'LICENCIATURA')
                                {{ $l = 'selected' }}
                                {{ $existe2 = 'LICENCIATURA' }}
                            @else
                                @if ($data['tipo'] == 'MAESTRIA')
                                    {{ $m = 'selected' }}
                                    {{ $existe2 = 'MAESTRIA' }}
                                @endif
                            @endif
                        @endif
                        <option value="LICENCIATURA" {{ $l }}>
                            Licenciatura
                        </option>
                        <option value="MAESTRIA" {{ $m }}>Maestría</option>
                    </select>
                </div>

                <div class="col-md-3 col-sm-12">
                    @if (array_key_exists('fechaA', $data))
                        @php
                            $existe3 = $data['fechaA'];
                        @endphp
                    @endif
                    <div class="input-group input-group-sm">
                        <input type="date" id="f_fechaA" name="f_fechaA" class="form-control form-control-sm"
                            placeholder="fechaA" value="{{ $existe3 }}">
                        <div class="input-group-append">
                            <span class="input-group-text"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-12 text-center">
                    <button type="button" class="btn btn-info btn-sm" data-toggle="tooltip" data-placement="top"
                        title="" data-original-title="Buscar" form="form-carrera"
                        onclick="filtro_carrera(this.form)"><i class="fa fa-search"></i></button>
                    <a
                        href="/exportarCarrerasPdf?nombre={{ $existe }}&tipo={{ $existe2 }}&fechaA={{ $existe3 }}">
                        <button type="button" data-toggle="tooltip" data-placement="top" title=""
                            data-original-title="Descargar PDF" class="btn btn-danger btn-sm"><i
                                class="fa fa-file-pdf-o"></i></button>
                    </a>
                    <a
                        href="/exportarCarrerasExcel?nombre={{ $existe }}&tipo={{ $existe2 }}&fechaA={{ $existe3 }}">
                        <button type="button" data-toggle="tooltip" data-placement="top" title=""
                            data-original-title="Descargar XLSX" class="btn btn-success btn-sm"><i
                                class="fa fa-file-excel-o"></i></button>
                    </a>
                    <button type="button" class="btn btn-light btn-sm" data-toggle="tooltip" data-placement="top"
                        title="" data-original-title="Limpiar" form="form-carrera" onclick="limpiar_carrera()"><i
                            class="fa fa-undo"></i></button>
                </div>
            </div>
        </form>
    </div>
</nav>
