import{K as u,m as d,j as i,k as r,t as o,F as m,B as c,D as f,q as _,a8 as x,C as g,v as y,X as l}from"./BCLrUOBx.js";const k={name:"FilterBrand",props:{brands:{type:Array,default(){return[]}}},data(){return{brand:[],brandExpanded:!1}},components:{},mixins:[],computed:{},mounted(){(this._.provides[l]||this.$route).query.brand&&(this.brand=(this._.provides[l]||this.$route).query.brand.split(","),this.$emit("brand-change",this.brand))},methods:{brandChanged(){this.$emit("brand-change",this.brand);let e=Object.assign({},(this._.provides[l]||this.$route).query);this.brand.length?e={...e,brand:this.brand.join(",")}:delete e.brand,this.$emit("reset-route",e)}}},v={class:"sidebar-section mt-xs"},C={class:"title mb-xs-5"},$=["for"],E=["id","value"];function B(e,t,h,q,n,b){return i(),d("div",v,[r("h4",C,o(e.$t("listingLayout.brands")),1),r("div",{class:g(["collapsible",{expanded:n.brandExpanded}])},[(i(!0),d(m,null,c(h.brands,(s,p)=>(i(),d("label",{class:"block mtb-10",key:p,for:`brand-${s.id}`},[f(r("input",{id:`brand-${s.id}`,type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=a=>n.brand=a),name:"brand",value:s.id,onChange:t[1]||(t[1]=(...a)=>b.brandChanged&&b.brandChanged(...a))},null,40,E),[[x,n.brand]]),_(" "+o(s.title),1)],8,$))),128))],2),r("button",{"aria-label":"Show/Hide",onClick:t[2]||(t[2]=y(s=>n.brandExpanded=!n.brandExpanded,["prevent"])),class:"link mt-15"},o(n.brandExpanded?e.$t("filter.hideAll"):e.$t("featured.showAll")),1)])}const j=u(k,[["render",B]]);export{j as default};
