<?php $__env->startSection('css'); ?>
<?php echo Minify::stylesheet('/css/study.css')->withFullUrl(); ?>

<?php echo Minify::stylesheet('/css/studyStarred.css')->withFullUrl(); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('title'); ?>
<?php echo e(Lang::get('studies.starred.oferta de cursos destacados de aula abierta')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('description'); ?>
<?php echo e(Lang::get('studies.starred.vea aqui los cursos destacados')); ?>


<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<?php echo Breadcrumbs::render('study-aa-starred'); ?>

<div class="container" id="vueDestacados" codIdioma="<?php echo e($codIdioma); ?>" url="<?php echo e($url); ?>">
    <div class="titulo_categoria">
        <span><?php echo e(Lang::get('studies.starred.cursos destacados')); ?></span>
    </div>

    <div class="row starred-wrapper" >
    <div class="col-md-3 item-wrapper" v-for="c in getCursos" :key="c.idTitulacion">
            <div class="item">
                <div class="wrapper-claim">
                    <div class="claim-text">
                        <h1>{{c.nombreTitulacion}}</h1>
                        <p v-html="c.descripcion">
                        </p>
                        <a class="btn btn-large btn-primary" v-on:click="goto_route(c)">
                            <?php echo Lang::get('studies.starred.informese aqui'); ?>

                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="spacer"></div>
</div>
<div class="spacer"></div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">

    new Vue({
        el: '#vueDestacados',
        props: {
        },
        data: { 
            cursos: [],
            codIdioma: null
        },
        computed: {
            getCursos: function() {
                return this.cursos
            }
        },
        mounted () {
            this.codIdioma = this.$el.attributes.codIdioma.value
            var params = { params: { codIdioma: this.codIdioma } }
            axios
            .get(this.$el.attributes.url.value + '/getLastASAulaLibreWebPublica', params)
            .then(
                response => {
                    this.cursos = response.data
                })
            
        },
        methods: {
            
            goto_route: function(curso) {
                route = "<?php echo e(route('study-libres', ['id' => '?id?', 'nombre' => '?nombre?'])); ?>"
                route = route.replace('?id?', curso.idTitulacion)
                let nombreTitulacion = curso.nombreTitulacion.replace('/','-')
                route = route.replace('?nombre?', nombreTitulacion)
                location.href = route
            }
        },
    });

           
</script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js-code-post'); ?>
    <?php echo Minify::javascript('/js/custom.js')->withFullUrl(); ?>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.base', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>