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AI5B,gBAAiBoC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOT,EAAI3B,gBAAgB,IAAI,CAAC8B,EAAG,OAAO,CAACE,YAAY,cAAc,EACjVK,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/catalog/product/ProductWishlist.vue?5246","webpack:///./resources/area/web/default/js/components/catalog/product/ProductWishlist.vue","webpack:///./resources/area/web/default/js/components/catalog/product/ProductWishlist.vue?b2c3","webpack:///./resources/area/web/default/js/components/catalog/product/ProductWishlist.vue?c5f0"],"sourcesContent":["\n\n\n\n\n\n\n\n\nimport {Component, Vue, Prop} from 'vue-property-decorator';\n\n@Component({\n name: 'catalog-product-wishlist'\n})\n\nexport default class extends Vue {\n @Prop({default: false}) private readonly isOnWishlist: boolean;\n @Prop({default: false}) private readonly isOnlyButton: boolean;\n @Prop({default: true}) private readonly showOnMobile: boolean;\n @Prop() private readonly productId: number;\n @Prop() private readonly productName: string;\n @Prop() private readonly productSku: number;\n\n private wishlistToggle: boolean = false;\n\n private async toggleWishlist(): Promise<void> {\n try {\n await this.$store.dispatch('CustomerWishlist/toggleWishlistProduct', this.productId);\n await this.$store.dispatch('CustomerWishlist/updateWishlistCount', !this.wishlistToggle);\n this.wishlistToggle = !this.wishlistToggle;\n } catch (e) {\n // console.log(e);\n }\n finally {\n if(this.isMobile) {\n await this.$store.dispatch('GlobalMessages/addGlobalMessage', {\n id: this.wishlistToggle ? `add-${this.productSku}` : `remove-${this.productSku}`,\n message: this.wishlistToggle ? this.$t('{name} has been added to my favorites.', {name: this.productName}) : this.$t('{name} has been removed from my favorites.', {name: this.productName}),\n type: '--success'\n });\n }\n }\n }\n\n private get isMobile(): boolean {\n return !!this.$mobileDetect.mobile();\n }\n\n private created(): void {\n this.wishlistToggle = this.isOnWishlist;\n\n const placeholder = document.getElementById('wishlistPlaceholder');\n if (placeholder) {\n placeholder.style.display = 'none';\n }\n }\n}\n","import { render, staticRenderFns } from \"./ProductWishlist.vue?vue&type=template&id=eb565ae2&\"\nimport script from \"./ProductWishlist.vue?vue&type=script&lang=ts&\"\nexport * from \"./ProductWishlist.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!./ProductWishlist.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!./ProductWishlist.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:\"product__wishlist\",class:{'hide-for-small-only': !_vm.showOnMobile}},[_c('button',{class:{ '--active': _vm.wishlistToggle },on:{\"click\":function($event){return _vm.toggleWishlist()}}},[_c('span',{staticClass:\"toggle\"})])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["Vue","wishlistToggle","toggleWishlist","this","$store","dispatch","productId","e","isMobile","id","productSku","message","$t","name","productName","type","$mobileDetect","mobile","created","isOnWishlist","placeholder","document","getElementById","style","display","Prop","default","Component","render","_vm","_h","$createElement","_c","_self","staticClass","class","showOnMobile","on","$event","staticRenderFns"],"sourceRoot":""}