{"version":3,"file":"js/app.cca8ef7df5768a8bc2c8.js","mappings":"4hCAQe,8BAAc,EAAAA,IAGfC,mBACV,OAAOC,KAAKC,OAAOC,QAAQ,kCAAkCC,WAC3DC,GAAK,GAAGJ,KAAKK,YAAwB,cAAQ,GAAGD,EAAM,QACnD,CACP,CAEYE,wBACV,OAAON,KAAKC,OAAOM,MAAMC,iBAAiBC,SAC5C,CAEcC,wB,yCACZ,UACQV,KAAKC,OAAOU,SAAS,yCAA0C,CACnEC,UAAWZ,KAAKK,YAAwB,WACxCQ,UAAYb,KAAKD,eAGnB,EAAAe,eAAeC,OAAOC,iBAAiB,OAAD,wBAC7BhB,KAAKK,aAAW,CACnB,QAAWL,KAAKK,YAAwB,WACxC,cAAiBL,KAAKK,YAAwB,aAC7CL,KAAKD,aAAe,EAAAkB,eAAeC,IAAM,EAAAD,eAAeE,OAC3DnB,KAAKK,YAAkC,qB,CAE3C,MAAOe,GACPC,QAAQC,MAAM,8BAA8BF,I,CAEhD,G,GA7BA,IAAC,IAAAG,Q,2DADY,MAJd,IAAAC,WAAU,CACTC,KAAM,qB,yMCaR,SAXgB,E,SAAA,GACd,UACA,IACA,KACA,EACA,KACA,KACA,MAI8B,O,mJClBoM,QAAe,G,wDCAnP,IAAIC,EAAS,SAASA,SAAS,IAAIC,EAAI3B,KAAK4B,EAAGD,EAAIE,MAAMD,GAAUD,EAAIE,MAAMC,YAAY,OAAOF,EAAG,SAAS,CAACG,YAAY,gBAAgBC,MAAM,CAAE,WAAYL,EAAI5B,cAAekC,MAAM,CAAC,SAAWN,EAAIrB,kBAAkB,KAAO,UAAU4B,GAAG,CAAC,MAAQP,EAAIjB,wBACzP,EACIyB,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/catalog/product/ToggleWishlist.vue?210a","webpack:///./resources/area/web/default/js/components/catalog/product/ToggleWishlist.vue","webpack:///./resources/area/web/default/js/components/catalog/product/ToggleWishlist.vue?a60d","webpack:///./resources/area/web/default/js/components/catalog/product/ToggleWishlist.vue?e80e"],"sourcesContent":["\nimport {Component, Vue, Prop} from 'vue-property-decorator';\nimport {SolarDataLayer, WishlistEvents} from '@flashpointbv/solar-datalayer/dist';\n\n@Component({\n name: 'toggle-wishlist'\n})\n\nexport default class extends Vue {\n @Prop() private readonly productData: object;\n\n private get isOnWishlist(): boolean {\n return this.$store.getters['CustomerWishlist/wishlistItems'].findIndex(\n i => `${this.productData['product_id']}` === `${i['id']}`\n ) >= 0;\n }\n\n private get isWishlistLoading(): boolean {\n return this.$store.state.CustomerWishlist.isLoading;\n }\n\n private async productToggleWishlist(): Promise<any> {\n try {\n await this.$store.dispatch('CustomerWishlist/toggleWishlistProduct', {\n productId: this.productData['product_id'],\n newState: ! this.isOnWishlist\n });\n\n SolarDataLayer.init().addAddToWishlist({\n ...this.productData,\n 'item_id': this.productData['product_id'],\n 'item_group_id': this.productData['product_id']\n }, this.isOnWishlist ? WishlistEvents.ADD : WishlistEvents.REMOVE,\n this.productData['final_price_incl_tax'],\n );\n } catch (e) {\n console.error(`Unable to mutate wishlist: ${e}`);\n }\n }\n}\n","import { render, staticRenderFns } from \"./ToggleWishlist.vue?vue&type=template&id=68fe7a75&\"\nimport script from \"./ToggleWishlist.vue?vue&type=script&lang=ts&\"\nexport * from \"./ToggleWishlist.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!./ToggleWishlist.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!./ToggleWishlist.vue?vue&type=script&lang=ts&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('button',{staticClass:\"add__wishlist\",class:{ '--active': _vm.isOnWishlist },attrs:{\"disabled\":_vm.isWishlistLoading,\"type\":\"button\"},on:{\"click\":_vm.productToggleWishlist}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["Vue","isOnWishlist","this","$store","getters","findIndex","i","productData","isWishlistLoading","state","CustomerWishlist","isLoading","productToggleWishlist","dispatch","productId","newState","SolarDataLayer","init","addAddToWishlist","WishlistEvents","ADD","REMOVE","e","console","error","Prop","Component","name","render","_vm","_c","_self","_setupProxy","staticClass","class","attrs","on","staticRenderFns"],"sourceRoot":""}