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EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,4BAA4B,CAACF,EAAG,MAAM,CAACA,EAAG,SAAS,CAACE,YAAY,sBAAsBC,GAAG,CAAC,MAAQ,SAASC,GAAiC,OAAzBA,EAAOC,kBAAyBR,EAAIR,aAAaiB,MAAM,KAAMC,UAAU,IAAI,CAAEV,EAAkB,eAAEG,EAAG,OAAO,CAACA,EAAG,OAAO,CAACE,YAAY,uBAAuB,CAACL,EAAIW,GAAGX,EAAIY,GAAGZ,EAAIa,GAAG,gBAAgB,QAAQb,EAAIW,GAAGX,EAAIY,GAAGZ,EAAI5B,eAAsB,UAAM4B,EAAIc,OAAOd,EAAIW,GAAG,KAAKR,EAAG,KAAK,CAACE,YAAY,SAASU,MAAM,CAAC,WAAYf,EAAI7B,aAAa6B,EAAIgB,GAAIhB,EAAe,aAAE,SAASN,GAAQ,OAAOS,EAAG,KAAK,CAACE,YAAY,8BAA8BU,MAAM,CAAE,WAAYrB,EAAkB,YAAK,CAACS,EAAG,SAAS,CAACG,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOP,EAAIP,OAAOC,EAAO,IAAI,CAACM,EAAIW,GAAG,eAAeX,EAAIY,GAAGlB,EAAc,OAAG,iBAAiB,IAAG,MAAM,EACp1BuB,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/catalog/toolbar/ProductListToolbarSortSelect.vue?6a40","webpack:///./resources/area/web/default/js/components/catalog/toolbar/ProductListToolbarSortSelect.vue","webpack:///./resources/area/web/default/js/components/catalog/toolbar/ProductListToolbarSortSelect.vue?53ca","webpack:///./resources/area/web/default/js/components/catalog/toolbar/ProductListToolbarSortSelect.vue?b77b"],"sourcesContent":["\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, Vue, Prop} from 'vue-property-decorator';\n\n@Component({\n  name: 'catalog-product-list-toolbar-sort-select'\n})\n\nexport default class extends Vue {\n  @Prop({required: true}) readonly dataSource: string;\n\n  private openSorter: boolean = false;\n  private selectedOption: object = null;\n\n  private mounted(): void {\n    const $this = this;\n\n    setTimeout(() => {\n      document.addEventListener('click', function () {\n        if ($this.openSorter) { $this.openSorter = false; }\n      });\n      document.querySelectorAll('.catalog-category__page-size .sorter__button.size')[0]?.addEventListener('click', function (e) {\n        if ($this.openSorter) { $this.openSorter = false; }\n      });\n    },100);\n\n    this.selectedOption = this.sortOptions[0];\n  }\n  private get sortOptions(): Array<object> {\n    return this.$store.state[`${this.dataSource}`]['apiResponse']['sorting_options'] || [];\n  }\n\n  private updatePage(e): void {\n    const selectedOption = this.sortOptions[e.target.selectedIndex];\n    let selectedOptionJson = '{}';\n\n    if (null !== selectedOption['key']) {\n      selectedOptionJson = `{\"${selectedOption['key']}\": \"${selectedOption['sort'] || 'asc'}\"}`;\n    }\n\n    this.$store.dispatch(`${this.dataSource}/updatePageSort`, JSON.parse(selectedOptionJson));\n  }\n\n  private toggleSorter(): void {\n    this.openSorter = !this.openSorter;\n  }\n\n  private select(option: object) {\n    let selectedOptionJson = '{}';\n\n    if (null !== option['key']) {\n      selectedOptionJson = `{\"${option['key']}\": \"${option['sort'] || 'asc'}\"}`;\n    }\n    this.$store.dispatch(`${this.dataSource}/updatePageSort`, JSON.parse(selectedOptionJson));\n    this.selectedOption = option;\n    this.toggleSorter();\n  }\n}\n","import { render, staticRenderFns } from \"./ProductListToolbarSortSelect.vue?vue&type=template&id=47deb702&\"\nimport script from \"./ProductListToolbarSortSelect.vue?vue&type=script&lang=ts&\"\nexport * from \"./ProductListToolbarSortSelect.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!./ProductListToolbarSortSelect.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!./ProductListToolbarSortSelect.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"catalog-category__sorter\"},[_c('div',[_c('button',{staticClass:\"sorter__button sort\",on:{\"click\":function($event){$event.stopPropagation();return _vm.toggleSorter.apply(null, arguments)}}},[(_vm.selectedOption)?_c('span',[_c('span',{staticClass:\"hide-for-small-only\"},[_vm._v(_vm._s(_vm.$t('Sorteren op'))+\": \")]),_vm._v(_vm._s(_vm.selectedOption['label']))]):_vm._e()]),_vm._v(\" \"),_c('ul',{staticClass:\"sorter\",class:{'--active': _vm.openSorter}},_vm._l((_vm.sortOptions),function(option){return _c('li',{staticClass:\"catalog-category__sort-item\",class:{ '--active': option['is_active'] }},[_c('button',{on:{\"click\":function($event){return _vm.select(option)}}},[_vm._v(\"\\n          \"+_vm._s(option['label'])+\"\\n        \")])])}),0)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["Vue","openSorter","selectedOption","mounted","$this","this","setTimeout","document","addEventListener","querySelectorAll","e","sortOptions","$store","state","dataSource","updatePage","target","selectedIndex","selectedOptionJson","dispatch","JSON","parse","toggleSorter","select","option","Prop","required","Component","name","render","_vm","_h","$createElement","_c","_self","staticClass","on","$event","stopPropagation","apply","arguments","_v","_s","$t","_e","class","_l","staticRenderFns"],"sourceRoot":""}