import{_ as b}from"./DyTDafb2.js";import{h as B,u as S,k as D,j as U,m as r,x as w,A,B as H,C as j,D as x,b as E,e as g,c as I,F as c,E as L,f as N,d as R,g as V,H as f,S as Z,I as J}from"./CSGWN0Ke.js";import{c as P}from"./Dci3BOLr.js";import{u as $}from"./00Wz9xmJ.js";import"./BITtZpNW.js";import"./RssLZfLx.js";import"./CoNkNGrd.js";import"./FvgwuZVK.js";import"./DCT9NofI.js";const z={class:"bg-grey-200"},ta=B({__name:"[uid]",async setup(F){var p;let e,o;const{client:u}=S(),d=D(),n=U(),_=n.params.uid,s=([e,o]=r(()=>$()),e=await e,o(),e),m=w(),{BASE_URL:i}=A().public,{data:l,error:y}=([e,o]=r(()=>f(_,()=>u.getByUID("journal_post",_,{lang:d.value[n.params.lang]}),"$ytio2zL3Ui")),e=await e,o(),e);if(y.value||!((p=l.value)!=null&&p.data))throw H({statusCode:404,fatal:!0});const a=l.value.data,{data:h}=([e,o]=r(()=>f(a.category_relation.uid,()=>u.getByUID("journal_category",a.category_relation.uid,{lang:d.value[n.params.lang]}),"$MnDKJPHJcN")),e=await e,o(),e);a.eyebrow_headline=h.value.data.category_title;const C=j(()=>"canonical"in a&&"uid"in a.canonical&&a.canonical.uid?i+x(a.canonical):i+n.path),t=l.value;return(t.data.social_cards&&t.data.social_cards[0]&&t.data.social_cards[0].social_card_image.facebook?Object.keys(t.data.social_cards[0].social_card_image.facebook).length===0:!0)?m.value={}:(t.data.sharing_url=i+n.path,t.data.sharing_locale=t.lang?t.lang.split("-")[0]+"_"+t.lang.split("-")[1].toUpperCase():"en_GB",m.value=t.data),E({htmlAttrs:{lang:n.params.lang},title:a.meta_title||(s==null?void 0:s.meta_title_default),meta:[{hid:"description",name:"description",content:a.meta_description||(s==null?void 0:s.meta_description_default)||""}],link:[{rel:"canonical",href:C}]}),(K,M)=>{const v=b,k=Z;return g(),I("div",null,["image"in c(a)&&"url"in c(a).image.xlargeorientland?(g(),L(v,{key:0,content:c(a),autoplayvideo:!1},null,8,["content"])):N("",!0),R("article",z,[V(k,{slices:c(a).body,components:c(J)(c(P))},null,8,["slices","components"])])])}}});export{ta as default};