(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{2709:function(t,e,r){"use strict";r.r(e);var o=r(79),n=r(29);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u={name:"DiscountBadge",props:{item:{type:Object,required:!0},product:{type:Object,required:!0}},computed:{badgeClass:function(){return function(t){return"product-label__badge product-label__badge-position-".concat(t.position)}},badgeStyle:function(){return function(t){return t&&t.color?{backgroundColor:t.color}:{}}},borderStyle:function(){return function(t,e){return c({},"border".concat(e),"var(--spacer-4) solid ".concat(t.color))}}},methods:{getDiscountPrice:function(t){return t.special_price_discount?Number(t.special_price_discount):0},showDiscountDate:function(){return this.product&&this.product.special_price_to_date&&!Object(o.a)(this.product.special_price_to_date)},getDiscountDay:function(t){return t.special_price_to_date?Object(n.i)(t).date.day:null},getDiscountMonth:function(t){return t.special_price_to_date&&Object(n.i)(this.product).date.month}}},a=r(3),s=Object(a.a)(u,(function(){var t=this,e=t._self._c;return e("div",{class:t.badgeClass(t.item),style:t.badgeStyle(t.item)},[e("span",{staticClass:"product-label__badge_left",style:t.borderStyle(t.item,"Right")}),t._v(" "),e("span",{staticClass:"product-label__badge_right",style:t.borderStyle(t.item,"Left")}),t._v(" "),e("span",{staticClass:"product-label__badge_text"},[t._v("\n    -"+t._s(t.getDiscountPrice(t.product))+"%\n    "),t.showDiscountDate?e("span",[t._v("\n      "+t._s(t.$t("to"))+" "+t._s(t.getDiscountDay(t.product))+"."+t._s(t.getDiscountMonth(t.product))+"\n    ")]):t._e()])])}),[],!1,null,null,null);e.default=s.exports}}]);
//# sourceMappingURL=131.js.map