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