import{_ as w,b as $,c as k}from"./BCard.vue_vue_type_script_setup_true_lang-BAaV9t2h-BRkPXOoi.js";import{_ as y,a as S}from"./BCardText.vue_vue_type_script_setup_true_lang-SRGbviaO-lEmvBHzm.js";import{_ as I}from"./BCol.vue_vue_type_script_setup_true_lang-D0xTJQ30-C8E8teuV.js";import{_ as x}from"./BRow.vue_vue_type_script_setup_true_lang-BDkBauhk-2kwIwZ0y.js";import{_ as v,d as c,o as n,a as f,b as t,t as C,w as e,g as A,F as h,r as g,c as b}from"./index-D02r7Zsc.js";import"./dom-DVb-f0ZG-Crdf0-mU.js";import"./useColorVariantClasses-ZDE19TZw-Cvu7SygP.js";import"./useDefaults-DESCdb0p-CFLjYrdG.js";import"./BImg.vue_vue_type_script_setup_true_lang-BJeFN9OT-6jJZkpT2.js";import"./useRadiusElementClasses-DtKYQuWz-DKKObN9q.js";import"./object-0ALvRU0O-3BORTTD-.js";import"./index-C0p9vHHI-DoOEDIMw.js";import"./getClasses-CsgNQabU-zDOdZIGY.js";import"./useAlignment-Cw-9AVid-Db1FQC5G.js";const L={data:function(){return{articles:[],sections:[]}},created:function(){let s=this.getConfig().applimobile_parent_section,o=parseInt(this.getConfig().applimobile_section_show);if(!(s==0||o==0))switch(o){case 1:this.getArticles();break;case 2:this.getSections();break;case 3:this.getArticles(),this.getSections();break}},methods:{getArticles:async function(){this.publish("showOverlay",!0);let s=await this.get("ws").getSectionArticles(this.get("sessionId"),this.getConfig().applimobile_parent_section);if(s.length){this.articles=await this.get("ws").listArticles(this.get("sessionId"),s);for(let o of this.articles)this.set("cmsarticle_"+o.id_article,o)}this.publish("showOverlay",!1)},getSections:async function(){this.publish("showOverlay",!0);let s=await this.get("ws").getSectionSections(this.get("sessionId"),this.getConfig().applimobile_parent_section);if(s.length){this.sections=await this.get("ws").listSections(this.get("sessionId"),s);for(let o of this.sections)this.set("cmssection_"+o.id_section,o)}this.publish("showOverlay",!1)}}},B={class:"d-flex align-items-center mb-4"},H={class:"h3 title text-secondary text-center mb-0 flex-grow-1"};function M(s,o,O,T,N,F){const l=$,a=I,r=S,_=k,m=x,d=A("router-link"),u=w,p=y;return n(),c("div",null,[f("div",B,[f("h1",H,C(s.$t("home.news")),1)]),t(p,{deck:""},{default:e(()=>[(n(!0),c(h,null,g(s.articles,i=>(n(),b(u,{key:i.id_article,class:"m-2"},{default:e(()=>[t(d,{class:"text-decoration-none",to:{name:"cmsarticle",params:{id:i.id_article}}},{default:e(()=>[t(m,{class:"g-0"},{default:e(()=>[t(a,{cols:"12"},{default:e(()=>[t(l,{src:i.article_logo+"medium",alt:"Image",class:"rounded"},null,8,["src"])]),_:2},1024),t(a,null,{default:e(()=>[t(_,{title:i.article_title},{default:e(()=>[t(r,{innerHTML:i.article_resume},null,8,["innerHTML"])]),_:2},1032,["title"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),t(p,{deck:""},{default:e(()=>[(n(!0),c(h,null,g(s.sections,i=>(n(),b(u,{key:i.id_section,class:"m-2"},{default:e(()=>[t(d,{class:"text-decoration-none",to:{name:"cmssection",params:{id:i.id_section}}},{default:e(()=>[t(m,{class:"g-0"},{default:e(()=>[t(a,{cols:"12"},{default:e(()=>[t(l,{src:i.section_logo+"medium",alt:"Image",class:"rounded"},null,8,["src"])]),_:2},1024),t(a,null,{default:e(()=>[t(_,{title:i.section_title},{default:e(()=>[t(r,{innerHTML:i.section_resume},null,8,["innerHTML"])]),_:2},1032,["title"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})])}const X=v(L,[["render",M]]);export{X as default};
