import{K as v,m as a,j as o,i as S,A as d,k as l,w as c,v as g,q as $,t as p,F as y,B as _,l as f,C as k,_ as x,X as C,d as L,b as B,s as w}from"./BCLrUOBx.js";import{u as F}from"./Bxmfm8sn.js";const N={setup(){const{t:e}=L(),t=props.btnText||e("profile.upload"),r=B(),{categories:m}=w(r);return{categories:m,propBtnText:t}},name:"FilterCategory",props:{},data(){return{}},components:{},mixins:[F],computed:{subCategorySlug(){var e;return((e=(this._.provides[C]||this.$route).params)==null?void 0:e.subCategory)||null},categorySlug(){var e;return((e=(this._.provides[C]||this.$route).params)==null?void 0:e.category)||null},categoryList(){var e;if(this.categorySlug){const t=this.categories.find(r=>this.categorySlug===r.slug);if(t)return[t]}return(e=this.categories)==null?void 0:e.map(({public_sub_categories:t,...r})=>r)}},mounted(){},methods:{}},T={class:"category-wrapper"},V=["onClick"],P={key:0},R=["onClick"];function j(e,t,r,m,q,i){const u=x;return o(),a("div",T,[i.categorySlug?(o(),S(u,{key:0,to:"/all-products/products",class:"flex start mb-15",custom:!0},{default:c(()=>[l("span",{class:"flex",onClick:t[0]||(t[0]=g(s=>e.$emit("going-next","/all-products/products"),["prevent"]))},[t[1]||(t[1]=l("i",{class:"dimen-16x icon double-arrow-left-icon mr-5 opacity-6"},null,-1)),$(" "+p(e.$t("listingLayout.allProducts")),1)])]),_:1})):d("",!0),l("ul",null,[(o(!0),a(y,null,_(i.categoryList,(s,b)=>(o(),a("li",{key:b},[f(u,{class:k({active:i.categorySlug===s.slug}),to:e.categoryLink(s),custom:!0},{default:c(()=>[l("span",{onClick:g(n=>e.$emit("going-next",e.categoryLink(s)),["prevent"])},p(s.title),9,V)]),_:2},1032,["class","to"]),s.public_sub_categories?(o(),a("ul",P,[(o(!0),a(y,null,_(s.public_sub_categories,(n,h)=>(o(),a("li",{key:h},[f(u,{class:k({active:i.subCategorySlug===n.slug}),to:e.subCategoryLink(n,s),custom:!0},{default:c(()=>[l("span",{onClick:g(z=>e.$emit("going-next",e.subCategoryLink(n,s)),["prevent"])},p(n.title),9,R)]),_:2},1032,["class","to"])]))),128))])):d("",!0)]))),128))])])}const E=v(N,[["render",j]]);export{E as default};
