"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[8],{23:(i,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.usePrices=void 0;const c=r(2);e.usePrices=function({currency:i,currentVariant:e,quantity:r=1,subscription:o=!1,shopVersion:t="US"}){var a;try{const l=o?null===(a=null==e?void 0:e.sellingPlan)||void 0===a?void 0:a.pct:0,s=e.bundleVariants,n="INDIA"===t?"MRP ":"";if(null==s?void 0:s.length){const o=(0,c.getBundlePrice)(e.id,e.price,s,i,r);return{totalPriceToDisplay:o,totalBeforeDiscountPriceToDisplay:o,variantPriceToDisplay:n+(0,c.getBundlePrice)(e.id,e.price,s,i,1),beforeDiscountVariantPriceToDisplay:(0,c.getDisplayPrice)(e.id,e.price,i,1,l),compareAtPriceToDisplay:(0,c.getBundleCompareAtPrice)(e.id,e.compareAtPrice,s,i)}}const p=(0,c.getDisplayPrice)(e.id,e.price,i,r,l);return{totalPriceToDisplay:p,totalBeforeDiscountPriceToDisplay:p,variantPriceToDisplay:n+(0,c.getDisplayPrice)(e.id,e.price,i,1,l),beforeDiscountVariantPriceToDisplay:(0,c.getDisplayPrice)(e.id,e.price,i,1,l),compareAtPriceToDisplay:(0,c.getDisplayPrice)(`${e.id}:compare`,null==e?void 0:e.compareAtPrice,i,1)}}catch(i){return console.log("error on get display prices"),{totalPriceToDisplay:"",totalBeforeDiscountPriceToDisplay:"",variantPriceToDisplay:"",beforeDiscountVariantPriceToDisplay:"",compareAtPriceToDisplay:""}}}}}]);