import{d as te,a as se,c as ne,r as Q,w as oe,f as le,g as r,k as $,l as ce,h as o,i as q,j as f,F as ae,m as ie,p as re,_ as ue,s as de,v as i,y as _e,z as me,x as pe}from"./D-gpddSo.js";import{_ as fe}from"./_BDRLF76.js";import{u as he}from"./BYhoVGOL.js";import"./B4BLwNZ8.js";import"./CnawuFQ2.js";import"./DslTMqll.js";const ye={key:0},be={key:0,class:"text-center m-20"},ge={key:1},ve={key:0},$e={key:1,class:"mx-auto max-w-screen-lg text-center px-5 mb-20"},ke={key:2},Ee=te({__name:"[...slug]",async setup(xe){let h,B;const N=se(),{locale:k,t:J}=ne(),y=re(),T=y.public.DOMAIN,x=Q([]),n=Q();let C;const L=N.params.slug;L?C=L[L.length-1]:C=N.path.split(`/${k.value}/`)[1]||null;let w="";y.public.PREVIEW=="true"&&(w="&preview=true");const{data:X,pending:Ce,error:Le}=([h,B]=oe(()=>he(`content-type/${C}?locale=${k.value}&contentType=pageContentPage${w}`,{method:"GET",baseURL:`${y.public.AWS_API_ENDPOINT}/${y.public.AWS_API_ENV}/`},"$fQzTl8mGKt")),h=await h,B(),h);V(X.value);function Y(s){var l,c,b,_,g;const t=s.fields;if((l=s.sys)!=null&&l.id){const v={slug:s.fields.isNotLandable?"":t==null?void 0:t.slug,name:t.title},u=[];let m={},p={};if((c=t==null?void 0:t.parentPage)!=null&&c.fields){const e=(b=t==null?void 0:t.parentPage)==null?void 0:b.fields;if((_=e==null?void 0:e.parentPage)!=null&&_.fields){const a=(g=e==null?void 0:e.parentPage)==null?void 0:g.fields;m={slug:a!=null&&a.isNotLandable?"":a.slug,name:a==null?void 0:a.title},u.push(m)}p={slug:e!=null&&e.isNotLandable?"":e==null?void 0:e.slug,name:e==null?void 0:e.title},u.push(p)}u.push(v),x.value=u}else x.value=[]}function Z(s){const t=[];for(const l in s){const c=s[l];c!=null&&t.push({rel:"alternate",hreflang:l,href:`${T}/${l}/${c}`})}return t}function V(s){var l,c;n.value=s,Y(s);const t={title:`${(l=s.fields)==null?void 0:l.title} ${J("| Lappset Group | The world of playgrounds and sports")}`,meta:[{name:"description",content:(c=s.fields)==null?void 0:c.metaDescription}],link:[{rel:"canonical",hid:"canonical",href:`${T}/${k.value}/${s.fields.slug}`},...Z(s.fields.locales)]};le(t)}return(s,t)=>{var v,u,m,p,e,a,A,D,E,I,R,O,S,j,F,z,G;const l=me,c=ue,b=pe,_=fe,g=de;return i(),r("div",null,[$(c,null,{default:ce(()=>[$(l,{"breadcrumbs-list":o(x)},null,8,["breadcrumbs-list"])]),_:1}),o(n)?(i(),r("div",ye,[o(n).fields?(i(),r("div",ge,[(v=o(n))!=null&&v.fields&&Object.keys((u=o(n))==null?void 0:u.fields).length>0?(i(),r("div",ve,[(p=(m=o(n))==null?void 0:m.fields)!=null&&p.heroBanner?(i(),q(_,{key:0,type:"layoutHero",data:(a=(e=o(n))==null?void 0:e.fields)==null?void 0:a.heroBanner},null,8,["data"])):f("",!0),(D=(A=o(n))==null?void 0:A.fields)!=null&&D.content?(i(),r("div",$e,[$(g,{content:(I=(E=o(n))==null?void 0:E.fields)==null?void 0:I.content},null,8,["content"])])):f("",!0),(O=(R=o(n))==null?void 0:R.fields)!=null&&O.sections&&((F=(j=(S=o(n))==null?void 0:S.fields)==null?void 0:j.sections)==null?void 0:F.length)>0?(i(),r("div",ke,[(i(!0),r(ae,null,ie((G=(z=o(n))==null?void 0:z.fields)==null?void 0:G.sections,(d,ee)=>{var U,W,H,K,M,P;return i(),q(_,{key:ee,type:(H=(W=(U=d.sys)==null?void 0:U.contentType)==null?void 0:W.sys)!=null&&H.id?(P=(M=(K=d==null?void 0:d.sys)==null?void 0:K.contentType)==null?void 0:M.sys)==null?void 0:P.id:"",data:d,class:_e(d.classes)},null,8,["type","data","class"])}),128))])):f("",!0)])):f("",!0)])):(i(),r("div",be,[$(b)]))])):f("",!0)])}}});export{Ee as default};