import{u,c as g,o as e,d as r,k as o,e as s,F as y,r as C,i as h,a as d,t as m,g as x,n as N}from"./app-q0jdcHwC.js";import{b as k,a as f,c as M,C as D,d as _}from"./CategoryCard-BxHk54iJ.js";import"./useTruncateText-CroACzlR.js";const p={__name:"CategoryCardToggler",props:{categoryData:{type:Object,required:!0}},setup(a){const t=u();return(c,n)=>(e(),g(y,null,[s(t).themeName=="NextMart"?(e(),r(k,{key:0,category:a.categoryData},null,8,["category"])):o("",!0),s(t).themeName=="PrimeCart"?(e(),r(f,{key:1,category:a.categoryData},null,8,["category"])):o("",!0),s(t).themeName=="MegaMart"?(e(),r(M,{key:2,category:a.categoryData,isDark:!1},null,8,["category"])):o("",!0),s(t).themeName=="NovaStore"?(e(),r(D,{key:3,category:a.categoryData},null,8,["category"])):o("",!0),s(t).themeName=="UltraMart"?(e(),r(_,{key:4,category:a.categoryData},null,8,["category"])):o("",!0)],64))}},v={class:"main-container pt-8 pb-12"},b={class:"text-slate-800 text-lg lg:text-3xl font-bold"},B={key:0,class:"text-slate-950 text-xl font-medium leading-7"},w={__name:"Category",setup(a){const t=u(),c=C([]);h(()=>{n(),window.scrollTo(0,0)});const n=async()=>{axios.get("/categories").then(l=>{c.value=l.data.data.categories})};return(l,S)=>(e(),g("div",v,[d("div",b,m(l.$t("All Categories")),1),d("div",{class:N(["grid gap-3 sm:gap-6 items-start mt-6",s(t).themeName=="UltraMart"?"grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 md:grid-cols-4":"grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-6"])},[(e(!0),g(y,null,x(c.value,i=>(e(),r(p,{categoryData:i,key:i.id},null,8,["categoryData"]))),128)),c.value.length==0?(e(),g("div",B,m(l.$t("No Categories Found")),1)):o("",!0)],2)]))}};export{w as default};
