1import A from"./DKBnmzWv.js";import{_ as F}from"./CTgQ-yiy.js";import{_ as H}from"./Bxsdhj8h.js";import{c as r,o,d as s,b as D,u as E,r as x,l as G,a as I,m as O,n as R,p as d,g as e,f as v,h as n,w as i,t as l,F as y,q as w,s as Z,_ as J,j as K,e as P,ar as Q,z as U}from"./CjXW0tVs.js";import{_ as W}from"./DIDC4fqC.js";import{h as X}from"./CHokJBag.js";import{S as Y,M as ee,b as te,g as se}from"./BY6llZJu.js";import"./BQguEG_I.js";import"./CKH0mVqp.js";import"./C5qttOpm.js";import"./lIZA8kGU.js";import"./CQ2LAJqs.js";import"./D4RB4MK1.js";import"./EgO0MzPe.js";function oe(k,c){return o(),r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[s("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}const ae={class:"blog-category-page pb-12 min-h-[100vh]"},ne={key:1},re={class:"container mt-4"},le={class:"mx-2 my-2 hover:text-primary bg-neutral-100 hover:bg-neutral-200 transition text-sm font-semibold text-black py-2 px-4 rounded cursor-pointer h-full"},ie={key:0},ce={class:"container"},ue={class:"py-6 text-2xl font-bold"},me=["innerHTML"],de={class:"text-xs mt-12 text-center"},_e={class:"ml-auto w-fit mt-4"},pe={class:"flex justify-end"},ge={class:"py-1"},fe={key:1,class:"grid grid-cols-2 gap-x-6 gap-y-12 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-4 xl:gap-x-8 pb-12 mt-12"},he={key:2,class:"text-center mt-12"},qe={__name:"index",async setup(k){let c,_;const p=D(),$=p.params.category,g=x(null),{t:u}=E(),f=x(u("global.Default")),B=`/blog/category/${$}`,{data:t,pending:M,refresh:C}=([c,_]=G(()=>Z(B,{cache:!1,query:{ordering:g}},p.path)),c=await c,_(),c),S=K(()=>{if(!t.value)return null;const a=[{name:u("global.Shopping Guides"),url:"/blog"}];return a.push({name:t.value?.name,url:t.value?.url}),a});I(()=>({title:t?.value?.seo_title?t?.value?.seo_title:t?.value?.name}));const L=[{name:u("global.Most_popular"),query:"popular"},{name:u("global.Newest"),query:"date"}],N=a=>{f.value=a.name,g.value=a.query,C()};return O(async()=>{await R(),X("page_view",{...t.value})}),(a,h)=>{const T=A,q=F,V=H,j=J,z=W;return o(),r("div",ae,[e(M)?(o(),d(T,{key:0})):(o(),r("div",ne,[e(t)?.slider?.length>0?(o(),d(q,{key:0,slides:e(t)?.slider},null,8,["slides"])):v("",!0),s("div",re,[n(V,{breadcrumbs:e(S)},null,8,["breadcrumbs"]),n(j,{to:"/blog"},{default:i(()=>[s("button",le,l(a.$t("global.Browse_all_x",{x:a.$t("blogs.Entries")})),1)]),_:1}),e(t)?(o(),r("div",ie,[s("div",ce,[s("h1",ue,l(e(t).name?e(t).name:"Blog"),1),s("div",{class:"text-xs md:text-base",innerHTML:e(t)?.description},null,8,me)])])):v("",!0),s("p",de,l(e(u)("blogs.Articles_in_category_x",{x:e(t)?.posts.length})),1),h[0]||(h[0]=s("span",{class:"w-full h-[2px] bg-neutral-100 mt-2 block"},null,-1)),s("div",_e,[n(e(se),{as:"div",class:"relative inline-block text-left"},{default:i(()=>[s("div",pe,[n(e(Y),{class:"group inline-flex justify-center text-sm font-medium text-neutral-700 hover:text-neutral-900"},{default:i(()=>[P(l(a.$t("global.Sort"))+": "+l(e(f))+" ",1),n(e(oe),{class:"-mr-1 ml-1 h-5 w-5 flex-shrink-0 text-neutral-400 group-hover:text-neutral-500","aria-hidden":"true"})]),_:1})]),n(Q,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:i(()=>[n(e(ee),{class:"absolute right-0 z-[20] mt-2 w-40 origin-top-left rounded-md bg-white shadow-2xl ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:i(()=>[s("div",ge,[(o(),r(y,null,w(L,m=>n(e(te),{key:m,class:"hover:bg-neutral-100",onClick:b=>N(m)},{default:i(({active:b})=>[s("p",{class:U([b?"bg-primary text-white":"","block px-4 py-2 text-sm font-medium hover:bg-primary text-neutral-900 cursor-pointer transition"])},l(m.name),3)]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1})]),_:1})]),e(t)?.posts?.length>0?(o(),r("div",fe,[(o(!0),r(y,null,w(e(t).posts,m=>(o(),d(z,{class:"responsive-blog-item",post:m},null,8,["post"]))),256))])):(o(),r("p",he,l(a.$t("No_blogs_found")),1))])]))])}}};export{qe 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.