(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7fd0f681"],{2383:function(t,e,s){"use strict";var o=function(){var t=this,e=t._self._c;return e("div",t._l([1,2],(function(s){return e("div",{key:s.index,staticClass:"mb-5"},[e("div",{staticClass:"loader loader-titles"}),e("div",{staticClass:"d-flex loader-item flex-wrap my-3"},t._l([1,2,3,4],(function(t){return e("div",{key:t.index,staticClass:"loader loader-card mx-3 mt-3"})})),0)])})),0)},a=[],r={name:"loadingCourses"},i=r,l=(s("f0bf"),s("2877")),c=Object(l["a"])(i,o,a,!1,null,"56ecbd14",null);e["a"]=c.exports},"5a47":function(t,e,s){},"5af9":function(t,e,s){"use strict";s("ef30")},"5bc8":function(t,e,s){"use strict";s("941a")},"8a99":function(t,e,s){"use strict";s("e7a8")},"941a":function(t,e,s){},bb17:function(t,e,s){"use strict";s.r(e);var o=function(){var t=this,e=t._self._c;return e("Courses")},a=[],r=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{"min-height":"100vh"}},[e("div",{staticClass:"row px-4"},[e("div",{staticClass:"col-md-12 col-sm-12"},[t.loading?e("div",{staticClass:"mt-5"},[e("loadingCourses")],1):t._e(),t.all_products.length>0&&!t.loading?e("div",{staticClass:"mb-4 ml-2"},[e("h3",{staticClass:"mb-2 font-weight-normal"},[t._v("Todos los cursos")]),e("ProductsSlider",{attrs:{products:t.all_products}})],1):t._e(),t.offers.length>0&&!t.loading?e("div",{staticClass:"mb-4 ml-2"},[e("h3",{staticClass:"mb-2 font-weight-normal"},[t._v("Ofertas")]),e("ProductsSlider",{attrs:{products:t.offers}})],1):t._e()])])])},i=[],l=s("ffc9"),c=s("2383"),n={name:"Courses",components:{ProductsSlider:l["a"],loadingCourses:c["a"]},data(){return{all_products:[],loading:!0,offers:[]}},methods:{async getCourses(){var t=localStorage.getItem("id_user");const{data:e}=await this.$axios.get("/course/list-marketplace/"+t);this.all_products=e},async getOffers(){const{data:t}=await this.$axios.get("/offers/list");this.offers=t}},mounted(){this.getCourses(),this.getOffers(),this.loading=!1},created(){localStorage.setItem("showPrivateNavbar",!0),localStorage.setItem("showPublicNavbar",!1),localStorage.setItem("showPublicFooter",!1)}},u=n,d=(s("8a99"),s("2877")),f=Object(d["a"])(u,r,i,!1,null,null,null),p=f.exports,m={name:"Products",components:{Courses:p},created(){localStorage.setItem("mode","private"),localStorage.setItem("showPrivateNavbar",!1)}},g=m,v=Object(d["a"])(g,o,a,!1,null,null,null);e["default"]=v.exports},e7a8:function(t,e,s){},ef30:function(t,e,s){},f0bf:function(t,e,s){"use strict";s("5a47")},ffc9:function(t,e,s){"use strict";var o=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"text-center py-5"},[e("h2",[t._v(t._s(t.title))])]),e("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.products,(function(s){return e("slide",{key:s.id},[e("ProductCard",{attrs:{course:s,mode:t.mode}})],1)})),1)],1)},a=[],r=function(){var t=this,e=t._self._c;return t.course?e("div",{staticClass:"course-container py-5",attrs:{title:t.course.title},on:{click:function(e){return t.goToCourse()}}},[e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function({on:s,attrs:o}){return[e("div",t._g(t._b({staticClass:"course-card"},"div",o,!1),s),[e("img",{staticClass:"img-fluid",attrs:{loading:"lazy",src:t.course.portada_url,alt:"no image"}}),e("div",{staticClass:"dark-text course-name pb-2"},[e("span",[t._v(t._s(t.course.nombre))])]),e("div",{staticClass:"extra-info-container text-color py-3"},[e("div",{staticClass:"row-info"},[t.course.precio>0?e("div",{staticClass:"first-row text-white"},[t._v(" S/. "+t._s(t.course.precio.toFixed(2))+" ")]):t._e()]),e("div",{staticClass:"row-info"},[e("button",{staticClass:"btn bg-primary-pl"},[t._v("Información")])])])])]}}],null,!1,256106538)},[e("span",[t._v(t._s(t.course.nombre))])])],1):t._e()},i=[],l=(s("14d9"),{name:"ProductCard",data(){return{}},props:{course:{type:Object},mode:{type:String,default:"private"},width:Number,height:{type:String,default:"100%"}},methods:{goToCourse(){localStorage.setItem("mode",this.mode);var t=null==this.getProductType(this.course.tipo_producto_id)?"oferta":this.getProductType(this.course.tipo_producto_id);if("oferta"==t){const t={slug:this.course.slug};this.$router.push({name:"oferta",params:t})}else{const e={type:t,slug:this.course.slug};this.$router.push({name:"producto",params:e})}},getProductType(t){return 1==t?"curso":2==t?"diplomado":void 0}}}),c=l,n=(s("5af9"),s("2877")),u=Object(n["a"])(c,r,i,!1,null,"1056ebb4",null),d=u.exports,f=s("0a63"),p={name:"ProductsSlider",components:{ProductCard:d,Carousel:f["Carousel"],Slide:f["Slide"]},data(){return{mode:null,model:null}},mounted(){this.mode=localStorage.getItem("mode")},props:{products:{type:Array},title:{type:String}},methods:{}},m=p,g=(s("5bc8"),Object(n["a"])(m,o,a,!1,null,"364cae01",null));e["a"]=g.exports}}]);
//# sourceMappingURL=chunk-7fd0f681.373f6b2b.js.map