1import{_ as M}from"./btEXWPJy.js";import S from"./ByyoH1-a.js";import{_ as E}from"./XjoJ1b3S.js";import{F as k}from"./oWG0_cbn.js";import{w as L,aZ as x,al as v,q as u,m as d,aw as w,u as q,aC as f,F as I,am as A,p as R,l as p,aD as z,ae as i,a2 as G,n as K,d as Q}from"./Btshz83O.js";import{u as W}from"./BniiAUW-.js";import"./zmSl8O2h.js";import"./BLDrhh0d.js";import"./w791gwD9.js";const Z={class:"FaqContentBlock"},J={class:"grid"},X={class:"col-8-12 push-2-12 sm-col-1-1 sm-push-0"},Y={class:"subtitle uppercase tc-green flex mb-lg"},ee={class:"faq-wrapper col-8-12 push-2-12 sm-col-1-1 sm-push-0"},te={key:0,class:"filters flex col-1-1 no-p"},ne=["onClick"],ae={class:"faq-list flex flex-column col-1-1 no-p"},se=!1,le=L({__name:"Faq",props:{content:{type:Object,required:!0},settings:{type:Object,required:!1},contentblockIdx:{type:[String,Number],required:!1}},async setup(s){let l,m;const o=s,c=v([]),{data:C,error:oe}=([l,m]=x(()=>z(`/pages/${k}/filters`)),l=await l,m(),l);c.value=C.value?.filters||[];const g=v(o.content.questionList?.map(e=>e)||[]),r=v(o.content.categoryIds?.map(e=>e._id)||[]),B=p(()=>{if(g.value.length>0)return[];if(r.value.length>0)return r.value.length>0?[r.value[0]]:[];if(r.value.length===0){const e=c.value.find(t=>t.value===1264),a=e?e.options[0]:null;return a?[a.id]:[]}}),O=p(()=>({articles:{presetArticles:g.value,fillWithPageId:g.value.length===0},seo:{changeRoute:!1,changeHead:!1},filters:{enabled:!0,show:!1,multiple:!1,showResetFilters:!1,presetSelectedFilterIds:B.value},search:{enabled:!1,show:!1},pagination:{enabled:!1,show:!1,articlesPerPage:100}})),{filters:D,updateFilterValue:V,articles:$,executeArticles:y}
1=W(k,{...O.value,filterData:c.value,instanceKey:o.contentblockIdx});async function j(e,a){V(e,a),await y()}[l,m]=x(()=>y()),await l,m();const _=v(null);function P(e){o.content.accordion?_.value=_.value===e?null:e:_.value=e}const F=p(()=>{if(r.value.length===0)return c.value.flatMap(t=>t.options);const e=o.content.categoryIds.map(t=>t._id),a=c.value.flatMap(t=>t.options);return e.map(t=>a.find(h=>h.id===t)).filter(Boolean)}),T=p(()=>o.content.showFilters=="true"&&F.value.length>1&&g.value.length===0),N=p(()=>(e,a)=>{const t=D.value[e];return t&&Array.isArray(t.values)?t.values.includes(a):!1});return(e,a)=>{const t=M,h=S,U=E;return i(),u("div",Z,[d("div",J,[d("div",X,[d("span",Y,w(s.content.subtitle),1),q(t,{class:"heading-2","heading-type":s.content.seoHeadingtype,title:s.content.title},null,8,["heading-type","title"])]),d("div",ee,[f(T)?(i(),u("div",te,[(i(!0),u(I,null,A(f(F),(n,b)=>(i(),u("button",{key:n.id,class:G(["btn btn-secondary filter-button",{active:f(N)(0,n.id)}]),onClick:H=>j(0,n.id)},w(n.label),11,ne))),128))])):R("",!0),d("div",ae,[(i(!0),u(I,null,A(f($),(n,b)=>(i(),K(h,{id:n._id,key:`faq-item-${b}`,title:n.content.question,text:n.content.answerText,"is-open":f(_)===n._id,accordion:se,onToggle:H=>P(n._id)},null,8,["id","title","text","is-open","onToggle"]))),128))])]),q(U,{class:"btn-primary mt-md",name:s.content.linkObject?.name,link:s.content.linkObject?.link,target:s.content.linkObject?.target},null,8,["name","link","target"])])])}}}),_e=Q(le,[["__scopeId","data-v-12043d41"]]);export{_e 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.