(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1754f5dc"],{2383:function(t,s,e){"use strict";var o=function(){var t=this,s=t._self._c;return s("div",t._l([1,2],(function(e){return s("div",{key:e.index,staticClass:"mb-5"},[s("div",{staticClass:"loader loader-titles"}),s("div",{staticClass:"d-flex loader-item flex-wrap my-3"},t._l([1,2,3,4],(function(t){return s("div",{key:t.index,staticClass:"loader loader-card mx-3 mt-3"})})),0)])})),0)},a=[],r={name:"loadingCourses"},i=r,c=(e("f0bf"),e("2877")),u=Object(c["a"])(i,o,a,!1,null,"56ecbd14",null);s["a"]=u.exports},"2d7a":function(t,s,e){},"45ec":function(t,s,e){"use strict";e("ff90")},"5a47":function(t,s,e){},ad28:function(t,s,e){"use strict";e.r(s);var o=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"min-height":"100vh"}},[s("div",{staticClass:"row px-4"},[s("div",{staticClass:"col-md-12 col-sm-12"},[s("h3",{staticClass:"mb-2 font-weight-normal"},[t._v("Mis Cursos")]),t.notCourses?s("div",{staticClass:"mb-4"},[t._m(0)]):t._e(),t.loading?s("div",{staticClass:"mt-5"},[s("loadingCourses")],1):t._e(),t.products.length>0&&!t.loading?s("div",{staticClass:"mb-4 ml-2"},[s("CarrouselCourse",{attrs:{courses:t.products}})],1):t._e()])])])},a=[function(){var t=this,s=t._self._c;return s("div",{staticClass:"no-result sad-face"},[s("span",[t._v("Lo sentimos, aún no hay cursos disponibles.")])])}],r=function(){var t=this,s=t._self._c;return s("main",[s("carousel",{attrs:{autoplay:!0,loop:!0,autoplayLoop:!0,autoplayTimeout:3e3,autoplayHoverPause:!0,navigationEnabled:!0,paginationEnabled:!1,perPageCustom:[[0,1],[450,1],[680,1],[940,2],[1100,3],[1200,4]]}},t._l(t.courses,(function(e){return s("slide",{key:e.id},[s("Card",{attrs:{course:e,cardType:t.cardType}})],1)})),1)],1)},i=[],c=function(){var t=this,s=t._self._c;return t.course?s("div",{staticClass:"course-card my-5",attrs:{title:t.course.nombre},on:{click:function(s){return t.goToCourse()}}},[s("div",{staticStyle:{"border-top-left-radius":"15px","border-top-right-radius":"15px"}},[s("img",{staticClass:"card-img-top border-radius-image",attrs:{src:t.course.portada_url}})]),s("div",{staticClass:"content"},[s("div",{staticClass:"col"},[s("div",{staticClass:"row px-3 py-3",staticStyle:{background:"#131b1e","border-bottom-left-radius":"15px","border-bottom-right-radius":"15px"}},[1==this.course.is_blocked&&0==this.course.fechaVencimiento?s("p",{staticClass:"text-danger p-0 m-0"},[t._v("Acceso bloqueado")]):t._e(),1==this.course.fechaVencimiento?s("p",{staticClass:"text-danger p-0 m-0"},[t._v("El tiempo del curso terminó")]):t._e(),1==this.course.fechaVencimiento?s("p",{staticClass:"text-danger p-0 m-0"},[t._v("Solicite tiempo extra al administrador si es necesario")]):t._e(),s("b",{staticClass:"text-left",staticStyle:{color:"white"}},[t._v(" "+t._s(t.course.nombre)+" ")])])])])]):t._e()},u=[],l=(e("14d9"),{name:"Card",data(){return{course_id:this.course.id,slug_class:""}},props:{mode:{type:String,default:"private"},course:{type:Object}},methods:{async goToCourse(){if(1==this.course.is_blocked)console.log("curso bloqueado");else{await this.$axios.get(`/user/${this.course_id}/course-slug`).then(t=>{this.slug_class=t.data.slug_class}),localStorage.setItem("mode",this.mode);const t={type:this.getProductType(this.course.tipo_producto_id),slug:this.slug_class,productSlug:this.course.slug_product};this.$router.push({name:"curso",params:t})}},getProductType(t){return 1==t?"curso":2==t?"diplomado":void 0}}}),n=l,d=(e("45ec"),e("2877")),p=Object(d["a"])(n,c,u,!1,null,"2842c3e0",null),m=p.exports,h=e("0a63"),f={name:"CarrouselCourse",components:{Card:m,Carousel:h["Carousel"],Slide:h["Slide"]},data(){return{peeked:!1,timeout:null,baseURL:"http://promolider.xyz/storage/",cardType:1}},props:{courses:{type:Array}},methods:{}},g=f,_=(e("be70"),Object(d["a"])(g,r,i,!1,null,"665f89b8",null)),C=_.exports,b=e("2383"),v={data(){return{products:[],loading:!0,notCourses:!1}},components:{CarrouselCourse:C,loadingCourses:b["a"]},mounted(){this.getData()},methods:{async getData(){try{let t=localStorage.getItem("id_user");const{data:s}=await this.$axios.get(`/user/${t}/purchased-products`);this.products=s,this.loading=!1}catch(t){window.location.reload()}}}},y=v,x=Object(d["a"])(y,o,a,!1,null,null,null);s["default"]=x.exports},be70:function(t,s,e){"use strict";e("2d7a")},f0bf:function(t,s,e){"use strict";e("5a47")},ff90:function(t,s,e){}}]);
//# sourceMappingURL=chunk-1754f5dc.b251e884.js.map