const s={data(){return{ajaxingWishlist:!1}},methods:{refundable(e){return parseInt(e==null?void 0:e.refundable)===1},warranty(e){return parseInt(e==null?void 0:e.warranty)===1?this.$t("productHelper.available"):this.$t("productHelper.notAvailable")},getPriceType(e){return parseInt(e.type)===this.priceType.FLAT?this.priceFormat(this.currencyPosition,this.currencyIcon,e.price,this.setting):e.price+"%"}}},l={data(){return{}},computed:{productPrice(){var e,r,i,t;return((r=(e=this.productInventory)==null?void 0:e.inventory_attributes)==null?void 0:r.length)>0&&((i=this.productInventory)==null?void 0:i.price)>0?(t=this.productInventory)==null?void 0:t.price:this.product.price>0?this.product.price:this.product.offered>0?this.product.offered:this.product.selling},reducedPercent(){return 100-parseInt((this.currentPricing/this.prevPrice*100).toString())},flashPrice(){var e,r;return((e=this.product)==null?void 0:e.price)!==null?parseFloat((r=this.product)==null?void 0:r.price):null},sellPrice(){var e;return parseFloat(((e=this.product)==null?void 0:e.selling)||0)},offeredPrice(){var e;return parseFloat(((e=this.product)==null?void 0:e.offered)||0)},prevPrice(){return parseFloat(this.offeredPrice>0?this.sellPrice:this.flashPrice?this.sellPrice:0)},currentPricing(){return parseFloat(this.flashPrice!==null?this.flashPrice:this.offeredPrice>0?this.offeredPrice:this.sellPrice)},inventoryPrice(){var e,r;return((e=this.inventory)==null?void 0:e.inventory_attributes.length)>0&&parseFloat((r=this.inventory)==null?void 0:r.price)||0},currentInventoryPrice(){return parseFloat(this.inventoryPrice>0?this.inventoryPrice:this.currentPricing)}},methods:{flashPriceCalc(e){return e!=null&&e.end_time?(e==null?void 0:e.price)??null:null},sellPriceCalc(e){return parseFloat((e==null?void 0:e.selling)||0)},offeredPriceCalc(e){return parseFloat((e==null?void 0:e.offered)||0)},currentPricingCalc(e){const r=this.flashPriceCalc(e);return r!==null?r:this.offeredPriceCalc(e)>0?this.offeredPriceCalc(e):parseFloat((e==null?void 0:e.selling)||0)},prevPriceCalc(e){return parseFloat(this.offeredPriceCalc(e)>0?this.sellPriceCalc(e):this.flashPriceCalc(e)?this.sellPriceCalc(e):0)},currentInventoryPriceCalc(e,r){var i;return((i=e==null?void 0:e.inventory_attributes)==null?void 0:i.length)>0?parseFloat((e==null?void 0:e.price)||0)>0?(e==null?void 0:e.price)||0:this.currentPricingCalc(r):this.currentPricingCalc(r)}}};export{l as a,s as p};
