"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:t=!1,shopVersion:o="US"}){var a,l;try{const s=t?null===(a=null==e?void 0:e.sellingPlan)||void 0===a?void 0:a.pct:0,n=e.bundleVariants,p="INDIA"===o?"MRP ":"",u=null!==(l=e.actualVariantId)&&void 0!==l?l:e.id;if(null==n?void 0:n.length){const t=(0,c.getBundlePrice)(u,e.price,n,i,r);return{totalPriceToDisplay:t,totalBeforeDiscountPriceToDisplay:t,variantPriceToDisplay:p+(0,c.getBundlePrice)(u,e.price,n,i,1),beforeDiscountVariantPriceToDisplay:(0,c.getDisplayPrice)(u,e.price,i,1,s),compareAtPriceToDisplay:(0,c.getBundleCompareAtPrice)(u,e.compareAtPrice,n,i)}}const P=(0,c.getDisplayPrice)(e.id,e.price,i,r,s);return{totalPriceToDisplay:P,totalBeforeDiscountPriceToDisplay:P,variantPriceToDisplay:p+(0,c.getDisplayPrice)(e.id,e.price,i,1,s),beforeDiscountVariantPriceToDisplay:(0,c.getDisplayPrice)(e.id,e.price,i,1,s),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:""}}}}}]);