\n
\n \n {t('cart.cartProductCardSubscription.badge.label')}\n
\n\n
\n
{formattedPrice}
\n
\n {t('cart.cartProductCardSubscription.price.discount', { discount })}\n
\n
\n
\n
\n
\n {t('cart.cartProductCardSubscription.frequency.deliveryFrequency')}\n
\n
handleOnFrequencyChange(event.target.value)}\n options={options}\n label={t('cart.cartProductCardSubscription.frequency.deliveryFrequency')}\n hideLabel\n />\n \n
\n\n
\n {renderWhySubscribePopin()}\n {toggleWhySubscribe && renderWhySubscribePopinContent()}\n\n \n
\n
\n );\n};\n\nexport default CartProductCardSubscription;\n","export const calculateDiscountPercentage = (originalPrice: number, discountedPrice: number): number =>\n Math.round(100 - (discountedPrice / originalPrice) * 100);\n","\n import API from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/.pnpm/css-loader@7.1.1_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../../node_modules/.pnpm/sass-loader@14.2.1_node-sass@9.0.0_sass@1.75.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/.pnpm/postcss-loader@8.1.1_postcss@8.4.38_typescript@5.5.3_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/postcss-loader/dist/cjs.js!./CartProductCard.module.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/.pnpm/css-loader@7.1.1_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../../node_modules/.pnpm/sass-loader@14.2.1_node-sass@9.0.0_sass@1.75.0_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/.pnpm/postcss-loader@8.1.1_postcss@8.4.38_typescript@5.5.3_webpack@5.91.0_webpack-cli@5.1.4_/node_modules/postcss-loader/dist/cjs.js!./CartProductCard.module.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import { ANALYTIC_EVENTS, CartProductType, isUserLoggedIn, ShopConfig } from '@rc-d2c/context-manager';\nimport {\n getStockLabelKey,\n hasPendingMutation,\n useAddProductToCartMutationState,\n useFormattedPrice,\n useFrequencyList,\n useRemoveProductFromCartMutation,\n useUpdateProductInCartMutation,\n} from '@rc-d2c/shared-behavior';\nimport { RcButton, RcButtonIcon, RcCard, RcLoader, RcMessage, RcOverlay, RcQuantityInput, RcSelect, RcSkuOption } from '@rc-d2c/shared-ui';\nimport { MutationState } from '@tanstack/react-query';\nimport classnames from 'classnames/bind';\nimport React, { useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\n\nimport { useNumberOfProducts } from '../../hooks';\nimport { getFrequencyFromProduct, getPriceFromProduct, getSizeFromProduct } from '../../utils/analyticsUtils';\nimport { CartButton } from '../CartButton/CartButton';\nimport CartProductCardSubscription from '../CartProductCardSubscription/CartProductCardSubscription';\nimport styles from './CartProductCard.module.scss';\n\nconst cx = classnames.bind(styles);\n\ntype CartProductCardProps = {\n inCartPanel?: boolean;\n};\n\nconst CartProductCard: React.FC