import{s as k,T as y,r as w,c as s,o as a,a as e,i as l,x as p,l as x,v as M,u,t as o,F as h,g as b,b as g,w as m,h as f}from"./app-Do7K7VDV.js";import{h as S}from"./moment-BAtM24Ew.js";const C={class:"col-lg-4"},L={class:"sidebar-two me-xxl-5 pe-xxl-4 md-mt-0"},N={class:"sidebar-container bg-one sidebar-search"},T={key:0,class:"sidebar-container bg-one sidebar-category"},V={class:"sidebar-title"},D={class:"style-none"},H={key:1,class:"sidebar-container bg-one blog-recent-news"},Y={class:"sidebar-title"},B={class:"post-data"},F={class:"date"},z={key:2,class:"sidebar-container bg-one blog-keyword"},P={class:"sidebar-title"},E={class:"style-none d-flex flex-wrap"},K={key:3,class:"sidebar-container bg-one contact-banner"},Q=["innerHTML"],R=["href"],q={__name:"Sidebar",props:["categories","recent_posts","tags","card"],setup(n){const{getQueryParams:_}=k(),c=y({s:_("s")??""}),v=()=>{c.get(route("blogs.index"),{preserveState:!0,preserveScroll:!0})};return(r,i)=>{const d=w("Link");return a(),s("div",C,[e("div",L,[e("div",N,[e("form",{onSubmit:p(v,["prevent"])},[x(e("input",{"onUpdate:modelValue":i[0]||(i[0]=t=>u(c).s=t),type:"text",placeholder:"Search.."},null,512),[[M,u(c).s]]),i[1]||(i[1]=e("button",null,[e("i",{class:"bi bi-search"})],-1))],32)]),n.categories.length>0?(a(),s("div",T,[e("h4",V,o(r.trans("Category")),1),e("ul",D,[(a(!0),s(h,null,b(n.categories,t=>(a(),s("li",{key:t.id},[g(d,{href:r.route("blogs.category",t.slug)},{default:m(()=>[f(o(t.title)+" ",1),e("span",null,"("+o(t.post_categories_count)+")",1)]),_:2},1032,["href"])]))),128))])])):l("",!0),n.recent_posts.length>0?(a(),s("div",H,[e("h4",Y,o(r.trans("Recent News")),1),(a(!0),s(h,null,b(n.recent_posts,t=>(a(),s("article",{class:"recent-news",key:t.id},[e("div",B,[e("div",F,o(u(S)(t.created_at).format("DD MMM YYYY")),1),g(d,{href:r.route("blogs.show",t.slug),class:"blog-title"},{default:m(()=>[e("h3",null,o(t.title),1)]),_:2},1032,["href"])])]))),128))])):l("",!0),n.tags.length>0?(a(),s("div",z,[e("h4",P,o(r.trans("Keywords")),1),e("ul",E,[(a(!0),s(h,null,b(n.tags,t=>(a(),s("li",{key:t.id},[g(d,{href:r.route("blogs.tag",t.slug)},{default:m(()=>[f(o(t.title),1)]),_:2},1032,["href"])]))),128))])])):l("",!0),n.card?(a(),s("div",K,[e("h5",{innerHTML:r.sanitizeHtml(n.card.title)},null,8,Q),e("a",{href:r.sanitizeHtml(n.card.button_link),class:"talk-btn tran3s"},o(n.card.button_text),9,R)])):l("",!0)])])}}};export{q as default};
