import{d as Ce,a as Be,c as Ie,w as Le,B as Te,r as u,a8 as Ne,f as Ae,g as De,h as i,l as h,m as Ee,i as l,j as $e,k as g,F as Re,n as Se,q as Fe,_ as Oe,t as Pe,v as Ue,x as a,z as Ve,A as We,y as Me}from"./CLkPlaab.js";import{_ as je}from"./Ch5YvZfo.js";import{u as ze}from"./CNkMGhz2.js";import"./DDp4Oosk.js";import"./suR1rAvS.js";import"./DslTMqll.js";const Ge={key:0,class:"text-center m-20"},He={key:1},qe={key:0},Ze={key:1,class:"mx-auto max-w-screen-lg text-center px-5 mb-20"},Je={key:2},nt=Ce({__name:"[...slug]",async setup(Ke){var R,S,F,O,P,U,V,W,M,j,z,G,H,q,Z,J,K,Q,X,Y,ee;let _,C;const B=Be(),{locale:r,t:I}=Ie(),p=Fe(),y=p.public.DOMAIN;let $;const b=B.params.slug;b?$=b[b.length-1]:$=B.path.split(`/${r.value}/`)[1]||null;let L="";p.public.PREVIEW=="true"&&(L="&preview=true");const{data:e}=([_,C]=Le(()=>Ue(()=>$fetch(`content-type/${$}?locale=${r.value}&contentType=pageContentPage${L}`,{method:"GET",baseURL:`${p.public.AWS_API_ENDPOINT}/${p.public.AWS_API_ENV}/`}),{watch:[r]},"$FxWZswoR4N")),_=await _,C(),_);if(!e.value)throw Te({statusCode:404,statusMessage:`${I("Page not found")}`,fatal:!0});const k=u([]),T=u((S=(R=e==null?void 0:e.value)==null?void 0:R.fields)==null?void 0:S.title),be=u((O=(F=e==null?void 0:e.value)==null?void 0:F.fields)==null?void 0:O.locales),t=u((P=e==null?void 0:e.value)==null?void 0:P.fields),x=Ne((U=e==null?void 0:e.value)==null?void 0:U.sys);if(x!=null&&x.id){const m={slug:(V=t.value)!=null&&V.isNotLandable?"":(W=t==null?void 0:t.value)==null?void 0:W.slug,name:T},o=[];let c={},v={};if((j=(M=t==null?void 0:t.value)==null?void 0:M.parentPage)!=null&&j.fields){const s=(G=(z=t==null?void 0:t.value)==null?void 0:z.parentPage)==null?void 0:G.fields;if((H=s==null?void 0:s.parentPage)!=null&&H.fields){const n=(q=s==null?void 0:s.parentPage)==null?void 0:q.fields;c={slug:n!=null&&n.isNotLandable?"":n==null?void 0:n.slug,name:n==null?void 0:n.title},o.push(c)}v={slug:s!=null&&s.isNotLandable?"":s.slug,name:s==null?void 0:s.title},o.push(v)}o.push(m),k.value=o}else k.value=[];const N=Ae((Z=e==null?void 0:e.value)==null?void 0:Z.fields),A=u((K=(J=e==null?void 0:e.value)==null?void 0:J.fields)==null?void 0:K.metaTitle),f=u((X=(Q=e==null?void 0:e.value)==null?void 0:Q.fields)==null?void 0:X.metaDescription),D=u(N?`https:${N}`:""),E=u(be),ke=()=>{const m=[];for(const o in E.value){const c=E.value[o];c!=null&&m.push({rel:"alternate",hreflang:o,href:`${y}/${o}/${c}`})}return m},d=`${A.value?A.value:T.value} ${I("| Lappset Group | The world of playgrounds and sports")}`;return ze({title:d,ogTitle:d,twitterTitle:d,ogImage:D.value,twitterImage:D.value,description:f.value,ogDescription:f.value,twitterDescription:f.value,ogUrl:`${y}/${r.value}/${(Y=t==null?void 0:t.value)==null?void 0:Y.slug}`}),De({title:d,meta:[{name:"description",content:f.value}],link:[{rel:"canonical",hid:"canonical",href:`${y}/${r.value}/${(ee=t==null?void 0:t.value)==null?void 0:ee.slug}`},...ke()]}),(m,o)=>{var te,se,ne,le,oe,ae,ue,ce,ie,re,me,_e,pe,fe,de,ve;const c=We,v=Oe,s=Me,n=je,xe=Pe;return a(),i("div",null,[h(v,null,{default:Ee(()=>[h(c,{"breadcrumbs-list":l(k)},null,8,["breadcrumbs-list"])]),_:1}),l(e).fields?(a(),i("div",He,[(te=l(e))!=null&&te.fields&&Object.keys((se=l(e))==null?void 0:se.fields).length>0?(a(),i("div",qe,[(le=(ne=l(e))==null?void 0:ne.fields)!=null&&le.heroBanner?(a(),$e(n,{key:0,type:"layoutHero",data:(ae=(oe=l(e))==null?void 0:oe.fields)==null?void 0:ae.heroBanner},null,8,["data"])):g("",!0),(ce=(ue=l(e))==null?void 0:ue.fields)!=null&&ce.content?(a(),i("div",Ze,[h(xe,{content:(re=(ie=l(e))==null?void 0:ie.fields)==null?void 0:re.content},null,8,["content"])])):g("",!0),(_e=(me=l(e))==null?void 0:me.fields)!=null&&_e.sections&&((fe=(pe=l(e))==null?void 0:pe.fields)==null?void 0:fe.sections.length)>0?(a(),i("div",Je,[(a(!0),i(Re,null,Se((ve=(de=l(e))==null?void 0:de.fields)==null?void 0:ve.sections,(w,we)=>{var he,ge,ye;return a(),$e(n,{key:we,type:(ye=(ge=(he=w.sys)==null?void 0:he.contentType)==null?void 0:ge.sys)==null?void 0:ye.id,data:w,class:Ve(w.classes)},null,8,["type","data","class"])}),128))])):g("",!0)])):g("",!0)])):(a(),i("div",Ge,[h(s)]))])}}});export{nt as default};