import{d,a as w,o as _,D as B,L as $,u as k,c as N,w as n,f as r,X as T,e as c,t as l,z as u,v as L,j as M,k as m,a0 as p,s as i,V}from"./m2W8DxR4.js";import{_ as z,a as D,b as F,c as H}from"./C8p6Bfm2.js";import{c as I}from"./DT-hKSom.js";import{_ as Q}from"./D4cd7EFQ.js";import{u as f}from"./Wxbikq7x.js";const S=d({__name:"CardFooter",props:{class:{}},setup(t){const e=t;return(o,s)=>(_(),w("div",{"data-slot":"card-footer",class:$(k(I)("flex items-center px-6 [.border-t]:pt-6",e.class))},[B(o.$slots,"default")],2))}}),j={class:"text-accent text-base leading-6 font-normal sm:text-base md:text-lg"},q=["innerHTML"],E=d({__name:"BlogCard",props:{id:{},title:{},tag:{},description:{},image:{},slug:{},slug_ar:{},slug_en:{}},setup(t){const e=t;return(o,s)=>{const a=T,g=z,x=F,b=D,h=Q,y=L,C=S,v=H;return _(),N(v,{class:"card bg-surface-background border-surface-border flex h-full flex-col rounded-lg border pt-0 transition-all duration-550 ease-in-out"},{default:n(()=>[r(g,{class:"px-0 py-0"},{default:n(()=>[r(a,{src:e.image,alt:e.title,class:"h-[150px] w-full rounded-t-lg object-cover sm:h-[180px] md:h-[200px] lg:h-[216px]"},null,8,["src","alt"])]),_:1}),r(b,{class:"flex-1 space-y-3 p-4"},{default:n(()=>[c("p",j,l(e.tag),1),r(x,{class:"line-clamp-2 text-lg leading-snug font-bold sm:text-xl md:text-2xl"},{default:n(()=>[u(l(e.title),1)]),_:1}),c("div",{class:"v-html-prose text-muted-foreground line-clamp-4 text-sm leading-relaxed font-normal sm:text-base md:text-lg",innerHTML:e.description},null,8,q)]),_:1}),r(C,{class:"p-4 pt-0"},{default:n(()=>[r(y,{to:{name:"blogs-slug",params:{slug:String(e.slug)}},class:"w-full"},{default:n(()=>[r(h,{variant:"wsGradient",size:"wsDefault",class:"w-full cursor-pointer text-base sm:text-base md:text-lg"},{default:n(()=>[u(l(o.$t("card.readMore")),1)]),_:1})]),_:1},8,["to"])]),_:1})]),_:1})}}}),O=M(E,[["__scopeId","data-v-81fab03e"]]);function P(t){const{get:e}=f(),{locale:o}=m();return p({staleTime:1e3*60*60,key:i(()=>["blogs",o.value,t.value]),query:async()=>{try{return(await e("blogs",{params:{page:t.value}})).data}catch(s){throw console.error(s.message),s}}})}function R(t){const{get:e}=f(),{locale:o}=m();return p({staleTime:1e3*60*60,key:i(()=>["blog",t,o.value]),query:async()=>{var s;try{const a=await e(`blogs/${t}`);return{blog:a.data.data,relatedBlogs:a.data.data.related_blogs}}catch(a){throw V({statusCode:((s=a==null?void 0:a.response)==null?void 0:s.status)||404,statusMessage:"Blog Not Found"})}}})}export{O as _,R as a,P as u};
