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ProductWishlistToggle.vue?06c8","webpack:///./resources/area/web/default/js/components/catalog/ProductWishlistToggle.vue","webpack:///./resources/area/web/default/js/components/catalog/ProductWishlistToggle.vue?85c5","webpack:///./resources/area/web/default/js/components/catalog/ProductWishlistToggle.vue?6a0b"],"sourcesContent":["\nimport {Component, Prop, Vue} from \"vue-property-decorator\";\nimport ServiceContainer from \"@flashpointbv/solar-service-container\";\n\n@Component({\n name: 'product-wishlist-toggle',\n components: ServiceContainer().getComponents()\n})\n\nexport default class extends Vue {\n @Prop({required: true}) productId: string;\n @Prop({default: () => []}) private wishlistItems: Array;\n @Prop({default: null}) readonly type: string | null;\n\n private wishlistToggle: boolean = this.isOnWishlist;\n private loading: boolean = false;\n\n private async toggleWishlist(): Promise {\n\n this.loading = true;\n try {\n await this.$store.dispatch('CustomerWishlist/toggleWishlistProduct', this.productId);\n if (this.type !== 'wishlist') {\n await this.$store.dispatch('CustomerWishlist/updateWishlistCount', !this.wishlistToggle);\n this.wishlistToggle = !this.wishlistToggle;\n } else {\n await this.$store.dispatch('CustomerWishlist/updateWishlistCount', false);\n this.$eventBus.$emit('remove-wishlist', this.productId);\n }\n } catch (e) {\n //\n } finally {\n this.loading = false;\n }\n }\n\n private get isOnWishlist(): boolean {\n if (this.type === 'wishlist') {\n return true;\n }\n return !!this.wishlistItems.filter(p => p['product_id'] === parseInt(this.productId) ?? -1).length;\n }\n}\n\n","import { render, staticRenderFns } from \"./ProductWishlistToggle.vue?vue&type=template&id=41205eff&\"\nimport script from \"./ProductWishlistToggle.vue?vue&type=script&lang=ts&\"\nexport * from \"./ProductWishlistToggle.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-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductWishlistToggle.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductWishlistToggle.vue?vue&type=script&lang=ts&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.type =='pdp')?_c('button',{staticClass:\"--button --flex --center --grey --big button--wishlist\",class:{ '--active': _vm.wishlistToggle, '--loading': _vm.loading },attrs:{\"disabled\":_vm.loading},on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.toggleWishlist()}}},[(!_vm.wishlistToggle)?[(!_vm.loading)?_c('svg',{attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"height\":\"20\",\"width\":\"20\",\"viewBox\":\"0 0 512 512\"}},[_c('path',{attrs:{\"fill\":\"#ec660d\",\"d\":\"M225.8 468.2l-2.5-2.3L48.1 303.2C17.4 274.7 0 234.7 0 192.8l0-3.3c0-70.4 50-130.8 119.2-144C158.6 37.9 198.9 47 231 69.6c9 6.4 17.4 13.8 25 22.3c4.2-4.8 8.7-9.2 13.5-13.3c3.7-3.2 7.5-6.2 11.5-9c0 0 0 0 0 0C313.1 47 353.4 37.9 392.8 45.4C462 58.6 512 119.1 512 189.5l0 3.3c0 41.9-17.4 81.9-48.1 110.4L288.7 465.9l-2.5 2.3c-8.2 7.6-19 11.9-30.2 11.9s-22-4.2-30.2-11.9zM239.1 145c-.4-.3-.7-.7-1-1.1l-17.8-20-.1-.1s0 0 0 0c-23.1-25.9-58-37.7-92-31.2C81.6 101.5 48 142.1 48 189.5l0 3.3c0 28.5 11.9 55.8 32.8 75.2L256 430.7 431.2 268c20.9-19.4 32.8-46.7 32.8-75.2l0-3.3c0-47.3-33.6-88-80.1-96.9c-34-6.5-69 5.4-92 31.2c0 0 0 0-.1 .1s0 0-.1 .1l-17.8 20c-.3 .4-.7 .7-1 1.1c-4.5 4.5-10.6 7-16.9 7s-12.4-2.5-16.9-7z\"}})]):_vm._e(),_vm._v(\" \"),_c('span',{staticStyle:{\"display\":\"none\"}},[_vm._v(_vm._s(_vm.$t('Put on wishlist')))])]:[(!_vm.loading)?_c('svg',{attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"height\":\"20\",\"width\":\"20\",\"viewBox\":\"0 0 512 512\"}},[_c('path',{attrs:{\"fill\":\"#ec660d\",\"d\":\"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z\"}})]):_vm._e(),_vm._v(\" \"),_c('span',{staticStyle:{\"display\":\"none\"}},[_vm._v(_vm._s(_vm.$t('Remove from wishlist')))])]],2):_c('button',{staticClass:\"--button --flex --center --big --grey button--wishlist\",class:{ '--active': _vm.wishlistToggle, '--loading': _vm.loading },attrs:{\"disabled\":_vm.loading},on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.toggleWishlist()}}},[_c('svg',{attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"height\":\"20\",\"width\":\"20\",\"viewBox\":\"0 0 512 512\"}},[_c('path',{attrs:{\"fill\":\"#ec660d\",\"d\":\"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z\"}})]),_vm._v(\" \"),_c('span',{staticStyle:{\"display\":\"none\"}},[_vm._v(_vm._s(_vm.$t('Remove from wishlist')))])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["Vue","wishlistToggle","this","isOnWishlist","loading","toggleWishlist","$store","dispatch","productId","type","$eventBus","$emit","e","wishlistItems","filter","p","parseInt","length","Prop","required","default","Array","Component","name","components","getComponents","render","_vm","_c","_self","_setupProxy","staticClass","class","attrs","on","$event","preventDefault","stopPropagation","_e","_v","staticStyle","_s","$t","staticRenderFns"],"sourceRoot":""}