{"version":3,"sources":["components/product/detail/prices/_std/product-detail-prices.js"],"names":["ProductDetailPrices","Component","constructor","el","priceOriginEl","$find","priceVatEl","priceNoVatEl","addEventListeners","updatePrices","variant","priceVAT","originalPrice","classList","remove","add","innerHTML","price","EventBus","getInstance","addEventListener","e","detail"],"mappings":"aAAA,KAAMA,CAAAA,mBAAN,QAAkCC,CAAAA,SAAU,CAC3CC,WAAW,CAACC,EAAD,CAAK,CACf,MAAMA,EAAN,EACA,KAAKC,aAAL,CAAqB,KAAKC,KAAL,CAAW,uBAAX,CAArB,CACA,KAAKC,UAAL,CAAkB,KAAKD,KAAL,CAAW,kBAAX,CAAlB,CACA,KAAKE,YAAL,CAAoB,KAAKF,KAAL,CAAW,qBAAX,CAApB,CACA,KAAKG,iBAAL,EACA,CAEDC,YAAY,CAACC,OAAD,CAAU,CAClB,GAAI,CAACA,OAAO,CAACC,QAAb,CAAuB,OAC1B,GAAID,OAAO,CAACE,aAAZ,CAA2B,CAC1B,KAAKR,aAAL,CAAmBS,SAAnB,CAA6BC,MAA7B,CAAoC,UAApC,CACA,CAFD,IAEO,CACN,KAAKV,aAAL,CAAmBS,SAAnB,CAA6BE,GAA7B,CAAiC,UAAjC,CACA,CACD,KAAKX,aAAL,CAAmBY,SAAnB,CAA+BN,OAAO,CAACE,aAAvC,CACA,KAAKN,UAAL,CAAgBU,SAAhB,CAA4BN,OAAO,CAACC,QAApC,CACA,KAAKJ,YAAL,CAAkBS,SAAlB,CAA8BN,OAAO,CAACO,KAAR,CAAgB,GAC9C,CAEDT,iBAAiB,EAAG,CACnBU,QAAQ,CAACC,WAAT,GAAuBC,gBAAvB,CAAwC,uBAAxC,CAAiEC,CAAC,EAAI,KAAKZ,YAAL,CAAkBY,CAAC,CAACC,MAApB,CAAtE,CACA,CAvB0C","sourcesContent":["class ProductDetailPrices extends Component {\r\n\tconstructor(el) {\r\n\t\tsuper(el);\r\n\t\tthis.priceOriginEl = this.$find('[data-price-original]');\r\n\t\tthis.priceVatEl = this.$find('[data-price-vat]');\r\n\t\tthis.priceNoVatEl = this.$find('[data-price-no-vat]');\r\n\t\tthis.addEventListeners();\r\n\t}\r\n\r\n\tupdatePrices(variant) {\r\n\t if (!variant.priceVAT) return ;\r\n\t\tif (variant.originalPrice) {\r\n\t\t\tthis.priceOriginEl.classList.remove('u-hidden');\r\n\t\t} else {\r\n\t\t\tthis.priceOriginEl.classList.add('u-hidden');\r\n\t\t}\r\n\t\tthis.priceOriginEl.innerHTML = variant.originalPrice;\r\n\t\tthis.priceVatEl.innerHTML = variant.priceVAT;\r\n\t\tthis.priceNoVatEl.innerHTML = variant.price + ' ';\r\n\t}\r\n\r\n\taddEventListeners() {\r\n\t\tEventBus.getInstance().addEventListener('productVariantChanged', e => this.updatePrices(e.detail));\r\n\t}\r\n}\r\n"],"file":"product-detail-prices.min.js"}