import{h as j,u as H,i as O,j as W,k as Z,r as q,l as G,m as d,w as J,n as M,o as X,b as B,d as r,c as Y,f as s,q as P,t as R,s as a,x as p,v as _,L as K,y as Q,z as tt,S as et,A as at,B as ot,C as nt}from"./entry.5970752d.js";import{_ as st}from"./index.scss.a16af558.js";import{_ as it}from"./index.scss.bf8313fc.js";import{u as rt}from"./useRouteToUid.c68fb9bc.js";import{u as lt}from"./composable.0f06f062.js";import{c as ct}from"./index.22e7a36b.js";const ut={class:"content-type content-type--full-width ct-insight-header --mb-large"},dt={class:"content-type__container ct-insight-header__container"},pt={class:"ct-insight-header__title heading-xxl"},_t={class:"ct-insight-header__info"},gt={class:"ct-insight-header__info--date"},xt=j({__name:"[uid]",async setup(mt){var v,y,b,w;let i,g;const{client:C}=H(),l=O(),o=Q(),{y:L}=W(),{height:U}=Z(),m=q(null),{height:$}=G(m),h=d(()=>{var e,n;return((e=t.value.data)==null?void 0:e.slicesFooter.length)>0?(n=t.value.data)==null?void 0:n.slicesFooter[0]:null}),{data:t}=([i,g]=J(()=>tt(`pim-insight-detail-${l.params.uid}`,()=>C.getByUID("insight",rt(),{lang:o.public.language,fetchLinks:["professional.image","professional.firstname","professional.lastname","professional.job_description"]}))),i=await i,g(),i);if(!t.value)throw M({statusCode:404,message:"Page not found",fatal:!0});const F=e=>{if(!e)return"";const n=e.getDate(),c=e.toLocaleString("nl-nl",{month:"long"}),u=e.getFullYear();return n+" "+c+" "+u},T=d(()=>t.value.data.slices.filter(e=>e.primary.anchor)),V=d(()=>L.value/($.value-U.value)*100),f=ot();X(()=>{var e;f&&f.enabled()&&((e=window.dataLayer)==null||e.push({event:"pageView",pageTitle:t.value.data.insight_title??"",pageType:"Insights",domein:t.value.data.datalayer_domein??"",specialisatie:t.value.data.datalayer_specialisatie??"",partner:t.value.data.datalayer_partner??""}))});const z=o.public.language.replace("-","_");return B({title:t.value.data.meta_title??"",meta:[{name:"description",content:t.value.data.meta_description??""},{name:"robots",content:t.value.data.meta_robots??t.value.tags.indexOf("pim")===-1?"noindex,nofollow":"index,follow"},{property:"og:site_name",content:"XSARUS.nl"},{property:"og:locale",content:o.public.language?z:""},{property:"og:type",content:t.value.data.og_type??""},{property:"og:title",content:t.value.data.og_title??""},{property:"og:description",content:t.value.data.og_description??""},{property:"og:image:url",content:t.value.data.og_image.url??""},{property:"og:image:width",content:t.value.data.og_image.dimensions?t.value.data.og_image.dimensions.width:""},{property:"og:image:height",content:t.value.data.og_image.dimensions?t.value.data.og_image.dimensions.height:""},{property:"og:image:alt",content:t.value.data.og_image.alt??t.value.data.og_title},{property:"og:url",content:o.public.baseUrl+l.path}]}),B(()=>({link:[{rel:"canonical",href:o.public.productionUrl+l.path}]})),lt({"@context":"https://schema.org","@type":"Article",headline:t.value.data.insight_title,image:[t.value.data.og_image.url??""],datePublished:t.value.data.release_date,author:[{"@type":"Person",name:(v=t.value.data.author.data)!=null&&v.firstname&&((y=t.value.data.author.data)!=null&&y.lastname)?((b=t.value.data.author.data)==null?void 0:b.firstname)+" "+((w=t.value.data.author.data)==null?void 0:w.lastname):"Person"}]}),(e,n)=>{var x,k,A,S,D;const c=nt,u=st,E=it,I=et,N=at;return r(),Y("div",{ref_key:"page",ref:m},[s("div",ut,[P(c,{position:"bottom-left"}),s("div",dt,[s("h1",pt,R((x=a(t).data)==null?void 0:x.insight_title),1),s("div",_t,[(k=a(t).data)!=null&&k.author?(r(),p(u,{key:0,data:(A=a(t).data)==null?void 0:A.author.data},null,8,["data"])):_("",!0),s("div",gt,R(F(K((S=a(t).data)==null?void 0:S.release_date))),1)])])]),a(t).data.show_anchor_bar?(r(),p(E,{key:0,"anchor-items":a(T),"button-text":a(t).data.anchor_bar_button_text,"button-link":a(t).data.anchor_bar_button_link,"scroll-position":a(V)},null,8,["anchor-items","button-text","button-link","scroll-position"])):_("",!0),P(I,{components:a(ct),slices:(D=a(t).data)==null?void 0:D.slices},null,8,["components","slices"]),a(h)?(r(),p(N,{key:1,"footer-page":a(h)},null,8,["footer-page"])):_("",!0)],512)}}});export{xt as default};
