import{K as p,m as i,j as s,k as n,t as d,F as _,B as m,D as f,q as g,a8 as y,X as c}from"./BCLrUOBx.js";const b={name:"FilterCollection",props:{collections:{type:Array,default(){return[]}}},data(){return{collection:[]}},components:{},mixins:[],computed:{},mounted(){(this._.provides[c]||this.$route).query.collection&&(this.collection=(this._.provides[c]||this.$route).query.collection.split(","))},methods:{collectionChanged(){let e=Object.assign({},(this._.provides[c]||this.$route).query);this.collection.length?e={...e,collection:this.collection.join(",")}:delete e.collection,this.$emit("reset-route",e)}}},k={class:"sidebar-section"},x={class:"title"},v=["for"],C=["id","value"];function $(e,t,u,q,r,a){return s(),i("div",k,[n("h4",x,d(e.$t("listingLayout.collections")),1),n("div",null,[(s(!0),i(_,null,m(u.collections,(o,h)=>(s(),i("label",{class:"block mtb-10",key:h,for:`collection-${o.id}`},[f(n("input",{id:`collection-${o.id}`,type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=l=>r.collection=l),value:o.id,onChange:t[1]||(t[1]=(...l)=>a.collectionChanged&&a.collectionChanged(...l))},null,40,C),[[y,r.collection]]),g(" "+d(o.title),1)],8,v))),128))])])}const j=p(b,[["render",$]]);export{j as default};
