PageSourceSearch

https://hubofhope.co.uk/_nuxt/DgrptqLm.js

js hubofhope.co.uk collected 2026-10-03 19:02:05 UTC 4,673 bytes, 2 lines download raw bytes

1import{aS as F,aU as o,b1 as n,bl as y,bk as v,aY as u,aW as $,aX as r,b2 as q,b0 as E,bj as I,b7 as A,aZ as k,a$ as b,a_ as S,ck as H,b4 as N,dS as Q,bf as T,aT as B,be as U}from"./CfOyg1Nd.js";import{_ as C}from"./CSdXOid9.js";import{_ as D}from"./C8HQH_Z3.js";import{u as j}from"./BLfYK1ef.js";import"./Dcib7b9q.js";const z={class:"flex items-center justify-center gap-x-10 gap-y-5 flex-wrap"},L={class:"group-hover:text-blue"},V=F({__name:"Categories",props:{categories:{type:Array,required:!0}},setup(g){return(c,m)=>{const s=E,d=I;return o(),n("ul",z,[(o(!0),n(y,null,v(g.categories,(_,i)=>(o(),n("li",{key:i},[u(d,{class:"flex items-center gap-x-3 group text-blue",to:"#"+_.id},{default:$(()=>[r("span",L,q(_.label),1),u(s,{name:"i-heroicons-chevron-down",class:"group-hover:text-blue size-4"})]),_:2},1032,["to"])]))),128))])}}}),M={class:"w-full flex flex-col gap-y-10"},O=["id"],W={class:"text-lg text-blue text-start font-medium"},G=F({__name:"Accordion",props:{items:{type:Array,required:!0}},setup(g){const c=A(new Set),m=A({}),s=(i,p)=>c.value.has(`${i}-${p}`),d=(i,p)=>{const e=`${i}-${p}`,l=m.value[e];return l?`${l.scrollHeight}px`:"0px"},_=(i,p)=>{const e=`${i}-${p}`;c.value.has(e)?c.value.delete(e):c.value.add(e)};return(i,p)=>{const e=E,l=N,x=C;return o(),n("div",M,[(o(!0),n(y,null,v(g.items,(f,a)=>(o(),n("div",{id:`${f.categoryId}-accordian`,key:f.categoryId,class:"group"},[(o(!0),n(y,null,v(f.questions,(h,t)=>(o(),n("div",{key:t,class:k(["cursor-pointer",[(s(a,t),"rounded-lg")]])},[u(l,{variant:"ghost",class:k(["w-full flex justify-between items-center hover:bg-[#EBEFF4]",[s(a,t)?"rounded-bl-none rounded-br-none bg-[#EBEFF4] p-8 pb-2":"rounded-lg p-8"]]),onClick:w=>_(a,t)},{trailing:$(()=>[u(e,{class:"ms-auto min-w-6 min-h-6",name:s(a,t)?"i-heroicons-minus-circle":"i-heroicons-plus-circle"},null,8,["name"])]),default:$(()=>[r("span",W,q(h.question),1)]),_:2},1032,["class","onClick"]),r("div",{class:k(["overflow-hidden transition-all duration-300 ease-in-out",[s(a,t)?"rounded-bl-lg rounded-br-lg bg-[#EBEFF4]":""]]),style:H({maxHeight:s(a,t)?d(a,t):"0px",opacity:s(a,t)?1:0})},[s(a,t)?(o(),n("div",{key:0,ref_for:!0,ref:w=>{w&&(b(m)[`${a}-${t}`]=w)},class:"px-8 pb-8 pt-0 text-[#252525]"},[u(x,{content:h.answer},null,8,["content"])],512)):S("",!0)],6)],2))),128))],8,O))),128))])}}}),K={class:"container flex flex-col gap-y-8 py-16 lg:py-14"},P={key:0,class:"flex flex-col gap-20 mt-10"},R=["id"],X={class:"col-span-full lg:col-span-5"},Y={class:"text-3xl font-semibold mb-4"},Z={key:1,class:"text-center py-8"},ne=F({__name:"faqs",setup(g){j({title:"Frequently Asked Questions",description:"Find answers to frequently asked questions about using Hub of Hope to find mental health support"});const{data:c,error:m}=Q("/api/v2/public/faqs");T(m,e=>{e&&U().add({title:"Error",description:(e==null?void 0:e.message)||"An error occurred while fetching FAQs",color:"red"})});const s=B(()=>{var e;return c.value?Array.isArray(c.value)?((e=c.value[0])==null?void 0:e.faqs)||[]:c.value.faqs||[]:[]}),d=B(()=>s.value.length?s.value.map(e=>({id:e.categoryId,label:e.categoryName,description:e.categoryDescription})):[]),_=e=>s.value.filter(l=>l.categoryId===e),i={to:"mailto:[email protected]",text:"Email us",icon:!0},p={to:"/need-help-now",text:"Get urgent help"};return(e,l)=>{const x=V,f=C,a=G,h=D;return o(),n("div",null,[r("div",K,[l[1]||(l[1]=r("div",{class:"grid grid-cols-12"},[r("div",{class:"col-span-full lg:col-span-6 flex flex-col gap-y-8"},[r("h1",{class:"text-4xl md:text-[2.625rem] text-blue font-bold"},"Frequently Asked Questions"),r("p",{class:"font-light font-poppins"}," Our mission is for anyone in the UK to be able to access mental health support whenever and wherever they need it. Every month we direct tens of thousands of people to life-changing and even life-saving support - below are some frequently asked questions about the Hub of Hope, how it works and how to use it. ")])],-1)),u(x,{categories:b(d)},null,8,["categories"]),b(s).length?(o(),n("div",P,[(o(!0),n(y,null,v(b(d),t=>(o(),n("div",{id:t.id,key:t.id,class:"grid grid-cols-12 lg:gap-20 scroll-mt-32"},[r("div",X,[r("h2",Y,q(t.label),1),u(f,{content:t.description},null,8,["content"])]),u(a,{items:_(t.id),class:"col-span-full lg:col-span-7"},null,8,["items"])],8,R))),128))])):(o(),n("div",Z,l[0]||(l[0]=[r("p",{class:"text-gray-500"},"Loading FAQs...",-1)])))]),u(h,{title:"Still have questions?",description:"The team will be happy to help with any queries you have. Email us at [email protected]","left-button":i,"right-button":p,"use-wave-border":""})])}}});
1export{ne as default};
2//# sourceMappingURL=DgrptqLm.js.map

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.