1import{_ as z}from"./Bwbph4uk.js";import{g as C,c,o as r,G as $,H as b,a as v,t as A,h as D,e as H,j as l,M as O,N as x,u as U,a0 as j,m as u,F as P,s as w,a7 as E,W as G,_ as R,x as V,b as M}from"#entry";import{_ as I}from"./DlAUqK2U.js";import"./Xq5V-v9t.js";import"./VobGKeE1.js";const W=["id"],Y={class:b(["font-bold text-white","pl-12 sm:pl-20 md:pl-28 lg:pl-48 xl:pl-64","text-[length:var(--text-policy)]"])},q=C({__name:"PolicyStripe",props:{policy:{},colorClass:{},index:{}},emits:["click"],setup(a,{emit:o}){const i=a,m=o,t=()=>{i.policy.path&&m("click",i.policy.path)};return(d,g)=>(r(),c("div",{id:a.policy.path?`policy-${a.policy.path.replace("/politik/","")}`:void 0,class:b(["policy-stripe relative cursor-pointer overflow-hidden transition-all duration-300 shadow-md rounded-t-2xl",a.colorClass]),style:$({minHeight:"max(6rem, calc(var(--text-policy) * var(--text-policy--line-height)))",padding:"1rem",zIndex:a.index,viewTransitionName:a.policy.path?`policy-header-${a.policy.path.replace(/\//g,"-")}`:void 0}),onClick:t},[v("h1",Y,A(a.policy.title),1)],14,W))}}),J=I(q,[["__scopeId","data-v-aabd258c"]]),K={class:"policy-container relative bg-[var(--color-a-green)]"},Q={key:0,class:"py-16 pt-32"},X={class:"container max-w-7xl mx-auto px-10 pt-10"},Z={class:"text-3xl font-bold mb-8"},tt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},et={key:1,class:"h-42"},ot=C({__name:"index",async setup(a){let o,i;const m=D(),t=H(),d=l(()=>G(t.value)),g=l(()=>t.value&&t.value.type!=="main"),N=l(()=>R(t.value)),y=["bg-[var(--color-jade)]","bg-[var(--color-turkis)]","bg-[var(--color-kaki)]","bg-[var(--color-mork-gron)]","bg-[var(--color-sage)]","bg-[var(--color-a-green)]"],S=O(),{data:_}=([o,i]=x(()=>S.fetchPostsByCategory("politik",10)),o=await o,i(),o),h=l(()=>{if(!_.value)return[];const{lokalkreds_id:e,storkreds_id:s}=N.value;return _.value.filter(k=>e?k.lokalkreds_id===e:s?k.storkreds_id===s:!1).slice(0,3)}),{data:f}=([o,i]=x(()=>E("/api/proxy/catalog-items/politik","$hjkNGUYUyf")),o=await o,i(),o),L=l(()=>f.value?.data?[...f.value.data].sort((e,s)=>(e.title??"").localeCompare(s.title??"")).map(e=>({path:`/politik/${e.slug}`,slug:e.slug,title:e.title??"",order:e.order})):[]),B=e=>y[e%y.length],F=async e=>{const s=e.replace("/politik/","");await m.push(`/politik/${s}`)};return U({title:l(()=>t.value?.type==="lokalkreds"?`Politik - Alternativet ${t.value.lokalkreds.name}`:t.value?.type==="storkreds"?`Politik - Alternativet ${t.value.storkreds.name}`:"Politik - Alternativet"),meta:[{name:"description",content:l(()=>t.value?.type==="lokalkreds"||t.value?.type==="storkreds"?`Læs om vores politiske visioner og løsninger for ${d.value}`:"Udforsk Alternativets politiske områder og visioner for Danmark")},{property:"og:title",content:l(()=>t.value?.type==="lokalkreds"?`Politik - Alternativet ${t.value.lokalkreds.name}`:t.value?.type==="storkreds"?`Politik - Alternativet ${t.value.storkreds.name}`:"Politik - Alternativet")},{property:"og:description",content:l(()=>t.value?.type==="lokalkreds"||t.value?.type==="storkreds"?`Læs om vores politiske visioner og løsninger for ${d.value}`:"Udforsk Alternativets politiske områder og visioner")},{name:"twitter:card",content:"summary_large_image"}]}),j("DefaultOg",{title:"Politik",tenantName:d.value},[{key:"og-only",width:1200,height:630},{key:"twitter",width:1200,height:600,props:{variant:"twitter"}}]),(e,s)=>{const k=z,T=J;return r(),c("div",null,[v("div",K,[u(g)&&u(h).length>0?(r(),c("section",Q,[v("div",X,[v("h2",Z,"Lokalt fra "+A(u(d)),1),v("div",tt,[(r(!0),c(P,null,w(u(h),n=>(r(),V(k,{key:n.post_id||n.id,post:n},null,8,["post"]))),128))])])])):(r(),c("div",et)),(r(!0),c(P,null,w(u(L),(n,p)=>(r(),c("div",{key:n.path||n.slug,class:"policy-stripe-wrapper",style:$({"--overlap":"calc(var(--text-policy) * var(--text-policy--line-height) * 0.24)","--index":p,marginTop:p===0?"0px":"calc(var(--overlap) * -1)",zIndex:p})},[M(T,{policy:n,"color-class":B(p),index:p,onClick:F},null,8,["policy","color-class","index"])],4))),128))])])}}}),nt=I(ot,[["__scopeId","data-v-2e7afbc1"]]);export{nt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.