(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[79,90],{FkNY:function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("tb-autocompleted-select",{ref:"autocomplete",attrs:{value:e.value,options:e.options,label:"Kategorie"},on:{input:function(t){return e.$emit("input",t)}}})};i._withStripped=!0;var a={name:"TbCategorySearch",props:{value:{validator:e=>"string"==typeof e||null===e,required:!0},type:{type:String,default:null}},data:()=>({options:{}}),async created(){const e=await this.categoryRepository.listFlattened(),t={};for(const r of e)this.type&&r.type!==this.type||(t[r.id]=r.nameWithParents);this.options=t},methods:{reset(){this.$refs.autocomplete.reset()}}},n=r("KHd+"),o=Object(n.a)(a,i,[],!1,null,null,null);o.options.__file="node_modules/@newland/toubiz-widget/src/components/basic/tb-category-search.vue";t.default=o.exports},"KHd+":function(e,t,r){"use strict";function i(e,t,r,i,a,n,o,s){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),i&&(u.functional=!0),n&&(u._scopeId="data-v-"+n),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=l):a&&(l=s?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:u}}r.d(t,"a",(function(){return i}))},MNSk:function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"tb-event-filter"},[r("div",{staticClass:"flex flex-wrap"},[r("tb-input",e._b({attrs:{label:"Startdatum",type:"date"},model:{value:e.query.filter.date.after,callback:function(t){e.$set(e.query.filter.date,"after",t)},expression:"query.filter.date.after"}},"tb-input",e.afterAttributes,!1)),e._v(" "),r("tb-input",e._b({attrs:{label:"Enddatum",type:"date"},model:{value:e.query.filter.date.before,callback:function(t){e.$set(e.query.filter.date,"before",t)},expression:"query.filter.date.before"}},"tb-input",e.beforeAttributes,!1)),e._v(" "),r("tb-category-search",{ref:"categorySearch",attrs:{type:"event"},model:{value:e.query.filter.category,callback:function(t){e.$set(e.query.filter,"category",t)},expression:"query.filter.category"}})],1),e._v(" "),e.query.filter.category?r("div",{staticClass:"tb-event-filter__tags"},[r("tb-filter-tag",{attrs:{category:e.query.filter.category},on:{"remove-filter":e.removeFilter}},[e._v("\n            "+e._s(e.getCategoryName(e.query.filter.category))+"\n        ")])],1):e._e()])};i._withStripped=!0;var a={components:{TbCategorySearch:r("FkNY").default},props:{value:{type:Object,required:!0}},data:()=>({search:"",query:{filter:{category:null}},categories:[]}),async created(){this.categories=await this.categoryRepository.listFlattened().then(e=>e.reduce((function(e,t){return e[t.id]=t,e}),{}))},watch:{value:{immediate:!0,handler(e){this.query=Object.assign({filter:{}},e)}},query:{deep:!0,handler(e){JSON.stringify(e)!==JSON.stringify(this.value)&&this.$emit("input",e)}}},computed:{afterAttributes(){return this.query.filter&&this.query.filter.date&&this.query.filter.date.before?{max:this.query.filter.date.before}:{}},beforeAttributes(){return this.query.filter&&this.query.filter.date&&this.query.filter.date.after?{min:this.query.filter.date.after}:{}}},methods:{getCategoryName(e){return this.categories[e].name},removeFilter(){this.$set(this.query.filter,"category",null),this.$refs.categorySearch.reset()}}},n=r("KHd+"),o=Object(n.a)(a,i,[],!1,null,null,null);o.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-event-filter.vue";t.default=o.exports}}]);