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G,IAAIT,EAAIU,GAAG9C,EAAOsB,cAAc,aAAsB,EAAE,IAAG,GAAGc,EAAIS,GAAG,KAAMT,EAAIxC,WAAWC,QAAQqC,OAASE,EAAI7C,cAAegD,EAAG,SAAS,CAACK,YAAY,YAAYH,MAAML,EAAI5C,gBAAkB,iBAAmB,eAAegE,MAAM,CAAC,KAAO,UAAUd,GAAG,CAAC,MAAQ,SAASC,GAAyD,OAAjDA,EAAOmB,iBAAiBnB,EAAOoB,kBAAyB3B,EAAIjC,2BAA2B,IAAI,CAACiC,EAAIS,GAAG,WAAWT,EAAIU,GAAGV,EAAI5C,gBAAkB4C,EAAI4B,GAAG,aAAe5B,EAAI4B,GAAG,gBAAgB,YAAY5B,EAAIyB,QAAQ,EAC5qEI,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/catalog/filter/SwatchFilter.vue?798c","webpack:///./resources/area/web/default/js/components/catalog/filter/BaseFilter.ts","webpack:///./resources/area/web/default/js/components/catalog/filter/SwatchFilter.vue","webpack:///./resources/area/web/default/js/components/catalog/filter/SwatchFilter.vue?278b","webpack:///./resources/area/web/default/js/components/catalog/filter/SwatchFilter.vue?4d54"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop } from 'vue-property-decorator';\nimport BaseFilter from './BaseFilter';\nimport { FilterData, FilterOption } from './FilterTypes';\n\n@Component({\n name: 'catalog-product-list-swatch-filter'\n})\nexport default class SwatchFilter extends BaseFilter {\n @Prop({ required: true }) filterData!: FilterData;\n\n protected filtersToShow: number = 4;\n protected filterCollapsed: boolean = true;\n protected filterOpen: boolean = true;\n\n get visibleOptions(): FilterOption[] {\n return this.filterCollapsed\n ? this.filterData.options.slice(0, this.filtersToShow)\n : this.filterData.options;\n }\n\n protected toggleFilterValue(option): void {\n option.active = !option.active;\n this.$emit('update-filter', this.filterData);\n }\n\n protected toggleFilterValueCollapse(): void {\n this.filterCollapsed = !this.filterCollapsed;\n }\n\n private resolveBackground(option: FilterOption): string {\n if ('color_code' in option) {\n return option.color_code || '';\n }\n return `url(\"/media/attribute/swatch${option.image_url}\")`;\n }\n}\n","import {Prop, Vue} from \"vue-property-decorator\";\nimport {FilterData, FilterOption} from \"./FilterTypes\";\n\nexport default class BaseFilter extends Vue {\n @Prop() readonly dataSource!: string;\n @Prop() readonly filterData!: FilterData;\n\n protected splitColumns: boolean = false;\n protected filtersToShow: number = 0;\n protected filterCollapsed: boolean = false;\n protected filterOpen: boolean = false;\n\n protected get activeFilters(): Array<object> {\n return this.$store.getters[`${this.dataSource}/activeFilters`] || [];\n }\n\n protected get sortedFilterDataOptions(): FilterOption[] {\n return [...this.filterData.options].sort((a, b) => {\n if (a.active !== b.active) {\n return b.active ? 1 : -1;\n }\n return b.result_count - a.result_count;\n });\n }\n\n protected get hasActiveOptions(): boolean {\n return this.filterData.options.some(option => option.active);\n }\n\n protected filterIsVisibleCheck(index: number): boolean {\n return this.filterCollapsed ? index < this.filtersToShow : true;\n }\n\n protected toggleFilterValue(option: FilterOption): void {\n this.$store.dispatch(`${this.dataSource}/toggleFilter`, {\n filter: this.filterData,\n option: option,\n blockId: (this.$parent as any)['blockId'] || null\n });\n }\n\n protected toggleFilterValueCollapse(): void {\n this.filterCollapsed = !this.filterCollapsed;\n }\n\n protected toggleFilter(): void {\n this.filterOpen = !this.filterOpen;\n }\n\n protected created(): void {\n this.splitColumns = (this.filterData.layout || '') === '2columns';\n this.filtersToShow = this.splitColumns ? 10 : 5;\n this.filterCollapsed = (this.filterData.options || []).length > this.filtersToShow;\n this.filterOpen = this.hasActiveOptions || this.activeFilters.length === 0;\n }\n}\n","import { render, staticRenderFns } from \"./SwatchFilter.vue?vue&type=template&id=8c9633f0&\"\nimport script from \"./SwatchFilter.vue?vue&type=script&lang=ts&\"\nexport * from \"./SwatchFilter.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SwatchFilter.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SwatchFilter.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dl',[_c('dt',{class:_vm.filterOpen ? '--visible' : '',on:{\"click\":function($event){return _vm.toggleFilter()}}},[_c('span',{staticClass:\"filter__label\",class:{ '--active': _vm.hasActiveOptions }},[_vm._v(_vm._s(_vm.filterData.label))])]),_vm._v(\" \"),_c('dd',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.filterOpen),expression:\"filterOpen\"}]},[_c('ol',{staticClass:\"--swatch\"},_vm._l((_vm.visibleOptions),function(option,index){return _c('li',{key:index,on:{\"click\":function($event){return _vm.toggleFilterValue(option)}}},[(option.hasOwnProperty('url') && null !== option.url)?[_c('a',{attrs:{\"href\":option.url,\"rel\":option.hasOwnProperty('follow_url') && !option.follow_url ? 'nofollow' : undefined}},[_c('label',{class:{ '--active': option.active }},[_c('span',{staticClass:\"--checkbox _color\"}),_vm._v(\" \"),_c('span',{staticClass:\"color__container\"},[_c('span',{staticClass:\"--color\",class:{ '_white': option.label === 'Wit' },style:({ background: _vm.resolveBackground(option) })}),_vm._v(\" \"),_c('span',{staticClass:\"--title\"},[_vm._v(_vm._s(option.label))]),_vm._v(\" \"),(!_vm.splitColumns)?_c('span',{staticClass:\"--count\"},[_vm._v(\"(\"+_vm._s(option.result_count)+\")\")]):_vm._e()])])])]:[_c('label',{class:{ '--active': option.active }},[_c('span',{staticClass:\"--checkbox _color\"}),_vm._v(\" \"),_c('span',{staticClass:\"color__container\"},[_c('span',{staticClass:\"--color\",class:{ '_white': option.label === 'Wit' },style:({ background: _vm.resolveBackground(option) })}),_vm._v(\" \"),_c('span',{staticClass:\"--title\"},[_vm._v(_vm._s(option.label))]),_vm._v(\" \"),(!_vm.splitColumns)?_c('span',{staticClass:\"--count\"},[_vm._v(\"(\"+_vm._s(option.result_count)+\")\")]):_vm._e()])])]],2)}),0),_vm._v(\" \"),(_vm.filterData.options.length > _vm.filtersToShow)?_c('button',{staticClass:\"show-more\",class:_vm.filterCollapsed ? '--chevron-down' : '--chevron-up',attrs:{\"type\":\"button\"},on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.toggleFilterValueCollapse()}}},[_vm._v(\"\\n \"+_vm._s(_vm.filterCollapsed ? _vm.$t('Toon meer') : _vm.$t('Toon minder'))+\"\\n \")]):_vm._e()])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["SwatchFilter","filtersToShow","filterCollapsed","filterOpen","visibleOptions","this","filterData","options","slice","toggleFilterValue","option","active","$emit","toggleFilterValueCollapse","resolveBackground","color_code","image_url","Prop","required","Component","name","BaseFilter","Vue","splitColumns","activeFilters","$store","getters","dataSource","sortedFilterDataOptions","sort","a","b","result_count","hasActiveOptions","some","filterIsVisibleCheck","index","dispatch","filter","blockId","$parent","toggleFilter","created","layout","length","render","_vm","_h","$createElement","_c","_self","class","on","$event","staticClass","_v","_s","label","directives","rawName","value","expression","_l","key","hasOwnProperty","url","attrs","follow_url","undefined","style","background","_e","preventDefault","stopPropagation","$t","staticRenderFns"],"sourceRoot":""}