import{u as f,f as c,g as b,i as A,s as L,j as k,o as l,c as r,a as e,t as d,F as B,r as C,n as P,m as n,q as D}from"./C_yW9YRN.js";const T={class:"container"},$={class:"text-3xl leading-[2.2rem] md:text-5xl font-extrabold mb-3 md:leading-[3.5rem] py-8 capitalize"},q={class:"grid lg:grid-cols-3 grid-cols-1 gap-8"},w={class:"border rounded-xl col-span-1 px-8 py-8 h-fit mb-8"},z={class:"space-y-4"},R=["onClick"],F={class:"col-span-2 space-y-4 my-5"},H={class:"text-2xl font-bold"},M=["innerHTML"],I={__name:"StaticPages",props:{endPoint:{required:!0},mainTitle:{required:!0}},async setup(u){let o,p;const x=D(),{locale:m}=f(),_=c(null),g=c(null),i=c(null),h=u;function v(t){i.value=t.id,_.value=t.description,g.value=t.type}const y=b().$axios,{data:s,error:N,pending:S}=([o,p]=A(()=>L(`${h.endPoint}`,()=>y.get(`${h.endPoint}`,{baseURL:x.public.baseURL,headers:{"Accept-Language":m.value}}).then(t=>t.data.data).catch(t=>t))),o=await o,p(),o);return k(()=>s.value,()=>{s.value&&s.value.length>0&&v(s.value[0])},{immediate:!0,deep:!0}),(t,U)=>(l(),r("div",T,[e("h1",$,d(u.mainTitle),1),e("div",q,[e("div",w,[e("div",z,[(l(!0),r(B,null,C(n(s),a=>(l(),r("div",{key:a.id},[e("button",{role:"button",onClick:j=>v(a),class:P(["text-start",{"text-primary font-bold":n(i)===a.id,"text-[#A3A3A3]":n(i)!==a.id}])},d(a.type),11,R)]))),128))])]),e("div",F,[e("h2",H,d(n(g)),1),e("div",{innerHTML:n(_),class:"staticPageDescription"},null,8,M)])])]))}};export{I as _};
