1import{_ as V}from"./bz1PbgH_.js";import{_ as j}from"./Bt7piiib.js";import A from"./BInDGNKK.js";import{c as M,f as z,h as H,g as J,_ as Q}from"./_6nnoVS0.js";import{u as W}from"./qBxxG4Qw.js";import{u as G}from"./Cda1jYPH.js";import{u as K}from"./2NQXVSYR.js";import{z as X,aw as Y,$ as a,F as c,N as v,ar as o,aa as r,a4 as m,a0 as P,a1 as $,a9 as N,P as Z,aq as tt,c as s}from"./7MFwCjE7.js";import"./cQZz2RSc.js";import"./Di6-OmFm.js";import"./BiOwI3e8.js";import"./BZm3y3Fi.js";import"./CcfEnsTb.js";import"./BzKO3Hgi.js";import"./DloDcl4q.js";import"./C6Y-ieo6.js";import"./BvsVS1kJ.js";import"./CSLOgOK6.js";import"./uIoF_Kyk.js";import"./Dh8P5OPu.js";import"./CpQO13n-.js";import"./dF0sEcaS.js";import"./D1DdGMk9.js";import"./C9YllXTq.js";import"./jFYhBC76.js";import"./DXUjx9WO.js";import"./7j92DFQK.js";import"./iuHYzs6n.js";import"./0QfFMgES.js";import"./CQm9l0Et.js";import"./BSg3QyiD.js";import"./BCYbgeoO.js";import"./DK8PUBJq.js";import"./BqhW9CSX.js";import"./DY9psGVd.js";import"./CExdvrg4.js";import"./DASFDUZa.js";import"./D4k11_F0.js";import"./DVZdTsrE.js";import"./CEaVRPJU.js";import"./Big0FcFE.js";import"./CtoZ5QH4.js";import"./DlAUqK2U.js";const et={class:"container mx-auto"},ot={class:"flex flex-col lg:flex-row gap-12"},nt={class:"lg:w-1/4"},rt={class:"lg:w-3/4 max-w-3xl mx-auto"},st={class:"mb-8"},at={class:"text-3xl md:text-4xl font-bold mb-4 text-gray-900"},it={class:"flex items-center text-sm text-gray-500 space-x-4"},ct={key:0},lt={key:1},mt={class:"prose prose-lg max-w-none text-gray-700 mb-12"},ut={key:0,class:"bg-brand-main p-6 rounded-lg mb-12"},dt={class:"text-lg font-semibold text-white mb-2"},pt={class:"text-white mb-4"},_t={key:1,class:"border-t border-gray-200 pt-12"},ft={class:"text-2xl font-bold mb-6"},ht={class:"grid gap-6 md:grid-cols-2"},vt={class:"flex items-start gap-3"},xt={class:"flex-1 min-w-0"},gt={class:"font-semibold text-lg mb-2 text-gray-900 group-hover:text-brand-main line-clamp-2"},yt={key:0,class:"text-sm text-gray-600 line-clamp-2 mb-2"},bt={class:"text-sm font-medium text-brand-main group-hover:underline"},wt="2PrbTtw19gpLALuhU2fjuf",kt=X({__name:"FaqPost",props:{entry:{type:Object,required:!0},entryType:{type:String,required:!0},seoMeta:{type:Object,required:!0},siblings:{type:Array,default:()=>[]},parents:{type:Array,default:()=>[]}},async setup(g){let _,y;const{locale:b}=M(),{getContentfulLink:w}=W();z();const f=g,{data:F}=([_,y]=Y(()=>G("/api/page-by-id",{query:{id:wt,locale:b.value}},"$R2O6WJ-ko4")),_=await _,y(),_),S=s(()=>F.value?.url||"/kundservice"),D=s(()=>{if(!f.parents||f.parents.length===0)return null;const t=f.parents[0];return t?.fields?{name:t.fields.name,url:w(t,"/faq")}:null}),l=s(()=>f.entry.fields),u=s(()=>l.value.name),h=s(()=>l.value.text),k=s(()=>l.value.published),q=s(()=>l.value.readTime),L=s(()=>l.value.showContactCs),x=s(()=>(l.value.relatedPost||[]).filter(e=>e?.sys?.id&&e?.fields?.name));function B(t){if(!t)return"";try{return new Date(t).toLocaleDateString(b.value,{year:"numeric",month:"long",day:"numeric"})}catch{return t}}function I(t){return w(t,"#")}function C(t){if(!t?.fields?.text?.content)return"";try{for(const e of t.fields.text.content)if(e.nodeType==="paragraph"&&e.content){for(const n of e.content)if(n.nodeType==="text"&&n.value){const i=n.value.trim();return i.length>120?i.substring(0,120)+"...":i}}}catch{}return""}const T=s(()=>{if(!h.value?.content)return"";let t="";try{for(const e of h.value.content)if(e.nodeType==="paragraph"&&e.content)for(const n of e.content)n.nodeType==="text"&&n.value&&(t+=n.value+" ");else if(e.nodeType==="unordered-list"&&e.content){for(const n of e.content)if(n.content){for(const i of n.content)if(i.content)for(const d of i.content)d.nodeType==="text"&&d.value&&(t+=d.value+" ")}}}catch{}return t.trim()}),U=s(()=>!u.value||!T.value?[]:[{question:u.value,answer:T.value}]);return K(U,{name:u}),(t,e)=>{const n=V,i=j,d=A,E=H,O=J,R=Q;return a(),c("div",et,[v(n,{"current-post":{name:u.value,entry:g.entry},"parent-section":D.value,class:"my-4"},null,8,["current-post","parent-section"]),o("div",ot,[o("aside",nt,[v(i,{class:"mb-6"})]),o("article",rt,[o("header",st,[o("h1",at,r(u.value),1),o("div",it,[k.value?(a(),c("span",ct,r(t.$t("common.published"))+": "+r(B(k.value)),1)):m("",!0),q.value?(a(),c("span",lt,"⢠"+r(t.$t("magazine.readTime",{time:q.value})),1)):m("",!0)])]),o("div",mt,[h.value?(a(),P(d,{key:0,document:h.value},null,8,["document"])):m("",!0)]),L.value?(a(),c("div",ut,[o("h3",dt,r(t.$t("common.needMoreHelp")),1),o("p",pt,r(t.$t("common.contactCsDescription")),1),v(E,{to:S.value},{default:$(()=>[N(r(t.$t("common.contactCustomerService")),1)]),_:1},8,["to"])])):m("",!0),x.value&&x.value.length>0?(a(),c("div",_t,[o("h2",ft,r(t.$t("faq.relatedQuestions")),1),o("div",ht,[(a(!0),c(Z,null,tt(x.value,p=>(a(),P(R,{key:p.sys.id,to:I(p),class:"block p-6 bg-white border border-gray-200 rounded-lg hover:border-default hover:bg-neutral-50 transition-all group"},{default:$(()=>[o("div",vt,[v(O,{name:"i-heroicons-question-mark-circle",class:"w-6 h-6 text-brand-main shrink-0 mt-0.5"}),o("div",xt,[o("h3",gt,r(p.fields.name),1),C(p)?(a(),c("p",yt,r(C(p)),1)):m("",!0),o("div",bt,[N(r(t.$t("common.readMore"))+" ",1),e[0]||(e[0]=o("span",{"aria-hidden":"true"},"â",-1))])])])]),_:2},1032,["to"]))),128))])])):m("",!0)])])])}}}),pe=Object.assign(kt,{__name:"ContentFaqPost"});export{pe 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.