1import{_ as U}from"./KWd2KHBI.js";import{_ as A}from"./CSw-Dy_N.js";import{_ as C}from"./jGvO3iyX.js";import{b as P,g as V,u as O,f as R,i as M,c as j}from"./CEh69y81.js";import{_ as z}from"./0HU5UWPA.js";import{d as x,q as F,m as G,B as r,_ as d,u as e,$ as h,O as b,a4 as m,S as o,X as t,W as g,Z as H,c as Q,ag as W,N as y,a2 as v}from"./BUqHG5hE.js";import{u as X}from"./CIdsc4Db.js";import{u as Z}from"./BwxGC_Zs.js";import"./Wk8s_Eei.js";import"./CeHePDgN.js";const J={key:1,class:"bg-cover bg-no-repeat bg-[url('~/assets/images/images/bgImg.svg')] w-full h-full pt-[180px] pb-[180px]"},K={class:"bg-cover bg-no-repeat bg-[url('~/assets/images/images/bgImg.svg')] w-full h-full pt-[180px] pb-[180px]"},Y={class:"container"},ee={class:"col-span-4 text-2xl mb-10 lg:text-3xl font-semibold"},te={class:"grid grid-cols-1 md:grid-cols-2 gap-5 xl:grid-cols-3"},ae={class:"container"},se={class:"col-span-4 text-2xl mb-10 lg:text-3xl font-semibold wow fadeInUp"},oe={class:"mb-8 wow fadeInUp"},ne={class:"relative max-w-md"},le=["placeholder"],re={key:0,class:"grid grid-cols-1 md:grid-cols-2 gap-5 xl:grid-cols-3"},ce={key:1,class:"flex flex-col items-center justify-center py-24 text-gray-400 wow fadeInUp"},ie={class:"text-lg font-medium"},we={__name:"index",setup(ue){const{t:i,locale:_}=P(),u=V(),w=O(),k=R().$axios,I=X(),c=x(u.query.search||"");let f=null;const p=x(c.value);F(c,a=>{clearTimeout(f),f=setTimeout(()=>{p.value=a},400)});async function L(){const a={};u.query.page&&(a.page=Number(u.query.page)),p.value&&(a.search=p.value);try{const{data:s}=await k.get("blogs",{params:a,headers:{"Accept-Language":_.value}});return s}catch(s){return I.error({message:s.data?.message}),null}}const{data:n,pending:T,error:pe}=Z("blogs",L,{watch:[()=>u.query.page,()=>_.value,p]}),$=G(()=>{const a=n.value?.meta;return a?{page:a.current_page*a.per_page-a.per_page||0,per_page:a.per_page,total:a.total}:null});return(a,s)=>{const B=U,N=A,S=C,q=j,D=z,E=M;return o(),r("div",null,[e(T)?(o(),d(B,{key:0})):(o(),r("div",J,[e(n)?.seo_meta?(o(),d(N,{key:0,metas:e(n)?.seo_meta},null,8,["metas"])):h("",!0),b(E,null,{fallback:m(()=>[t("div",K,[t("div",Y,[t("h2",ee,g(e(i)("TITLES.blogs")),1),t("div",te,[(o(),r(y,null,v(6,l=>t("div",{key:l,class:"w-full h-[250px] rounded-3xl bg-gray-100 animate-pulse"})),64))])])])]),default:m(()=>[t("div",ae,[t("h2",se,g(e(i)("TITLES.blogs")),1),t("div",oe,[t("div",ne,[H(t("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>Q(c)?c.value=l:null),type:"text",placeholder:e(i)("PLACEHOLDERS.search"),class:"w-full px-5 py-3 pe-12 rounded-full border border-gray-200 bg-white shadow-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent text-sm transition"},null,8,le),[[W,e(c)]]),s[1]||(s[1]=t("span",{class:"absolute end-4 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none"},[t("i",{class:"fa-solid fa-magnifying-glass"})],-1))])]),e(n)?.data?.length?(o(),r("div",re,[(o(!0),r(y,null,v(e(n).data,l=>(o(),d(q,{key:l.id,to:e(w)(`/blogs/${l.slug}`),class:"wow fadeInUp"},{default:m(()=>[b(S,{class:"w-full",item:l},null,8,["item"])]),_:2},1032,["to"]))),128))])):(o(),r("div",ce,[s[2]||(s[2]=t("i",{class:"fa-regular fa-newspaper text-5xl mb-4"},null,-1)),t("p",ie,g(e(i)("no_data")),1)])),e(n)?.meta?.total>e(n)?.meta?.per_page?(o(),d(D,{key:2,pagination:e($)},null,8,["pagination"])):h("",!0)])]),_:1})]))])}}};export{we 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.