import{O as e,c as t,ct as n,d as r,h as i,t as a,w as o}from"./_plugin-vue_export-helper-Conii5fq.js";import{i as s,r as c}from"./vuex.esm-bundler-CDO_-3pz.js";import{r as l}from"./router-BMknwoXv.js";import{t as u}from"./RenderContentComponent-co5qeVWC.js";var d={name:`ContentComponent`,components:{RenderContentComponent:u},props:{link:{type:String,required:!0}},data(){return{content:``,title:``}},computed:{...s([`menuData`]),...c([`getMenuData`])},watch:{link:{immediate:!0,handler(e){this.fetchContent(e),this.setTitle(e)}}},methods:{async fetchContent(e){try{this.content=(await l.get(`/page-content?link=${e}`)).data.content}catch(e){console.error(`Fehler beim Abrufen des Inhalts:`,e)}},setTitle(e){let t=(e,n)=>{for(let r of e){if(r.link===n)return r.pageTitle||r.name;if(r.submenu&&r.submenu.length>0){let e=t(r.submenu,n);if(e)return`${e}`}}return``};this.title=t(this.menuData,e)}}};function f(a,s,c,l,u,d){let f=e(`RenderContentComponent`);return o(),r(`div`,null,[t(`h1`,null,n(u.title),1),i(f,{content:u.content},null,8,[`content`])])}var p={name:`DefaultPage`,components:{ContentComponent:a(d,[[`render`,f]])},computed:{currentLink(){return this.$route.path}}},m={class:`some-page`};function h(t,n,a,s,c,l){let u=e(`ContentComponent`);return o(),r(`div`,m,[i(u,{link:l.currentLink},null,8,[`link`])])}var g=a(p,[[`render`,h]]);export{g as default};
//# sourceMappingURL=DefaultContent-iZnWdqMK.js.map