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