import{l as w,c as b,o as f,a as t,k as y,t as s,f as k,e as B}from"./app-q0jdcHwC.js";import{r as C}from"./EyeIcon-VDtOleu5.js";const N={class:"rounded-lg md:rounded-2xl border border-slate-200 transition-all duration-300 group bg-white overflow-hidden relative"},$={class:"w-full h-60 overflow-hidden relative"},j=["src"],V={key:0,class:"text-white px-1.5 py-0.5 rounded-lg bg-primary text-sm font-normal absolute top-2 left-2"},D={class:"text-primary text-sm leading-tight"},z={class:"text-slate-900 text-xl font-bold mt-2 truncate"},E={class:"text-slate-600 text-base font-normal mt-2 truncate"},O={class:"flex items-center justify-between gap-2 mt-2"},R={class:"flex items-center gap-1"},S={class:"text-slate-400 text-sm leading-tight"},T={class:"text-slate-900 text-sm"},q={class:"text-slate-400 text-xs"},A={class:"flex items-center gap-1 text-slate-800"},F={class:"text-sm"},I={__name:"BlogCard",props:{blog:Object},setup(e){const v=w(),_=e,a=()=>{var o;v.push("/blog/"+((o=_.blog)==null?void 0:o.slug))};return(o,l)=>{var n,i,r,c,d,g,u,m,h,x;return f(),b("div",N,[t("div",$,[t("div",{class:"cursor-pointer w-full h-full",onClick:l[0]||(l[0]=p=>a())},[t("img",{src:(n=e.blog)==null?void 0:n.thumbnail,class:"w-full h-full group-hover:scale-110 transition duration-500 object-cover",loading:"lazy"},null,8,j)]),(i=e.blog)!=null&&i.is_new?(f(),b("div",V,s(o.$t("New")),1)):y("",!0)]),t("div",{class:"p-4 cursor-pointer",onClick:l[1]||(l[1]=p=>a())},[t("div",D,s((c=(r=e.blog)==null?void 0:r.category)==null?void 0:c.name),1),t("div",z,s((d=e.blog)==null?void 0:d.title),1),t("div",E,s((g=e.blog)==null?void 0:g.description),1),t("div",O,[t("div",R,[t("span",S,s(o.$t("By")),1),t("span",T,s((m=(u=e.blog)==null?void 0:u.post_by)==null?void 0:m.name),1),t("span",q," - "+s((h=e.blog)==null?void 0:h.created_at),1)]),t("div",A,[k(B(C),{class:"w-5 h-5 text-slate-600"}),t("span",F,s((x=e.blog)==null?void 0:x.total_views),1)])])])])}}};export{I as _};
