import{_ as $,b as y,c as A}from"./BCard.vue_vue_type_script_setup_true_lang-BAaV9t2h-BRkPXOoi.js";import{_ as I,a as v}from"./BCardText.vue_vue_type_script_setup_true_lang-SRGbviaO-lEmvBHzm.js";import{_ as x}from"./BCol.vue_vue_type_script_setup_true_lang-D0xTJQ30-C8E8teuV.js";import{_ as L}from"./BContainer.vue_vue_type_script_setup_true_lang-Bi1hGl0B-Bd4Gid1V.js";import{_ as M}from"./BRow.vue_vue_type_script_setup_true_lang-BDkBauhk-2kwIwZ0y.js";import{_ as C,d as m,o as c,b as t,w as e,g as p,a as H,t as T,F as g,r as b,c as w}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 B={data:function(){return{childSections:[],childArticles:[]}},computed:{section:function(){return this.get("cmssection_"+this.$route.params.id)}},created:async function(){this.getConfig().applimobile_section_allow_navigation=="1"&&this.getData()},beforeUpdate:function(){this.getConfig().applimobile_section_allow_navigation=="1"&&(this.childSections=[],this.childArticles=[],this.getData())},methods:{getData:function(){switch(parseInt(this.getConfig().applimobile_section_show)){case 1:this.getArticles();break;case 2:this.getSections();break;case 3:this.getArticles(),this.getSections();break}},getArticles:async function(){this.publish("showOverlay",!0);let i=await this.get("ws").getSectionArticles(this.get("sessionId"),this.$route.params.id);if(i.length){this.childArticles=await this.get("ws").listArticles(this.get("sessionId"),i);for(let o of this.childArticles)this.set("cmsarticle_"+o.id_article,o)}this.publish("showOverlay",!1)},getSections:async function(){this.publish("showOverlay",!0);let i=await this.get("ws").getSectionSections(this.get("sessionId"),this.$route.params.id);if(i.length){this.childSections=await this.get("ws").listSections(this.get("sessionId"),i);for(let o of this.childSections)this.set("cmssection_"+o.id_section,o)}this.publish("showOverlay",!1)}}},D={class:"h3 title text-center text-primary"};function O(i,o,F,N,V,a){const S=p("backbutton"),n=x,l=M,k=L,r=y,_=A,u=v,h=p("router-link"),d=$,f=I;return c(),m("div",null,[t(k,null,{default:e(()=>[t(l,{"align-v":"center"},{default:e(()=>[t(n,{cols:"3"},{default:e(()=>[t(S)]),_:1}),t(n,{cols:"9"},{default:e(()=>[H("h1",D,T(a.section.section_title),1)]),_:1})]),_:1})]),_:1}),t(d,{class:"m-2"},{default:e(()=>[t(r,{src:a.section.section_logo+"medium",alt:"Image"},null,8,["src"]),t(_,{innerHTML:a.section.section_contenu},null,8,["innerHTML"]),t(f,{deck:""},{default:e(()=>[(c(!0),m(g,null,b(i.childArticles,s=>(c(),w(d,{key:s.id_article,class:"m-2"},{default:e(()=>[t(h,{class:"text-decoration-none",to:{name:"cmsarticle",params:{id:s.id_article}}},{default:e(()=>[t(l,{class:"g-0"},{default:e(()=>[t(n,{cols:"12"},{default:e(()=>[t(r,{src:s.article_logo+"medium",alt:"Image",class:"rounded"},null,8,["src"])]),_:2},1024),t(n,null,{default:e(()=>[t(_,{title:s.article_title},{default:e(()=>[t(u,{innerHTML:s.article_resume},null,8,["innerHTML"])]),_:2},1032,["title"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),t(f,{deck:""},{default:e(()=>[(c(!0),m(g,null,b(i.childSections,s=>(c(),w(d,{key:s.id_section,class:"m-2"},{default:e(()=>[t(h,{class:"text-decoration-none",to:{name:"cmssection",params:{id:s.id_section}}},{default:e(()=>[t(l,{class:"g-0"},{default:e(()=>[t(n,{cols:"12"},{default:e(()=>[t(r,{src:s.section_logo+"medium",alt:"Image",class:"rounded"},null,8,["src"])]),_:2},1024),t(n,null,{default:e(()=>[t(_,{title:s.section_title},{default:e(()=>[t(u,{innerHTML:s.section_resume},null,8,["innerHTML"])]),_:2},1032,["title"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})]),_:1})])}const tt=C(B,[["render",O]]);export{tt as default};
