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AAA,EAAAA,KAAlB+J,cACAC,GAASC,EAAAA,EAAAA,IAAO,GAAD,OAXX,aAWW,uBAErBC,EACA,CACEC,kBAAcC,EACdC,mBAAmB,EACnBC,iBAAkBP,IANdC,KAoBR,OAVAO,EAAAA,EAAAA,YAAU,WACHV,EAGCG,GACFF,EAAQE,GAHVH,GAAa,IAMd,CAACG,IAEG,CAAE5J,gBAAAA,GAGX,SAAS8J,EAAqBM,GAC5Bb,EAAgBjG,QAEhB,IAAM+G,GADNd,EAAkB,IAAIC,iBACSa,OAC/B,OAAOC,EAAAA,EAAAA,GACLF,EACAC,GACA,SAACT,EAAMW,GACLA,EAAQX,EAAK5J,gBAAgBwK,WAE/B,K,qDCpDG,IAAM/F,EAAe,G,qDCErB,IAAMG,EAAyB,SAAC6F,GACrC,IAAMC,EAAe,GAErB,GAAKD,EASL,OAPIA,EAAU5N,OAAS4N,EAAU5N,MAAMiH,MACrC4G,EAAa/B,KAAK8B,EAAU5N,MAAMiH,MAGhC2G,EAAUtP,MAAQsP,EAAUtP,KAAK2I,MACnC4G,EAAa/B,KAAK8B,EAAUtP,KAAK2I,MAE5B4G,EAAaC,KAAK,Q,4CCK3B,IAfwB,SAACrK,EAAmBC,GAC1C,IAAQqK,GAAiBhL,EAAAA,EAAAA,KAAjBgL,aAEJxK,EAAYE,EAShB,OARIuK,EAAAA,EAAAA,IAAQvK,MAAWuK,EAAAA,EAAAA,IAAQtK,KAC7BH,EAAYG,EAAgB,KAG1BsK,EAAAA,EAAAA,IAAQzK,KACVA,EAAYwK,GAGP,CAAExK,UAAAA","sources":["Atoms/Price/Price.tsx","Atoms/ProductTag/ProductTag.tsx","Atoms/Quantity/QuantitySelector.tsx","Organisms/CartItem/useQuantitySelector.tsx","Organisms/CartItem/useCartItem.tsx","Organisms/CartItem/SoldOut.tsx","Organisms/CartItem/CartItemDesktop.tsx","Organisms/CartItem/CartItemMobile.tsx","Organisms/ProductList/ProductList.tsx","Shared/Cart/Stock.ts","Shared/Common/QuantityLimit.ts","Shared/Common/VariationHelpers.ts","Shared/Hooks/useProductImage.ts"],"sourcesContent":["import { styled } from 'stitches.config';\r\nimport { CSS } from '@stitches/react';\r\n\r\ntype PropType = {\r\n nowPrice: number | undefined;\r\n wasPrice: number | undefined;\r\n friendlyNowPrice: string | undefined;\r\n friendlyWasPrice: string | undefined;\r\n size?: 'xs' | 'sm' | 'lg';\r\n direction?: 'row' | 'columnReverse';\r\n nowPriceSize?: CSS;\r\n wasPriceSize?: CSS;\r\n};\r\n\r\nfunction Price({\r\n nowPrice,\r\n wasPrice,\r\n friendlyNowPrice,\r\n friendlyWasPrice,\r\n size = 'sm',\r\n direction = 'row',\r\n nowPriceSize,\r\n wasPriceSize,\r\n}: PropType) {\r\n let hasLoweredPrice = false;\r\n if (nowPrice && wasPrice) {\r\n hasLoweredPrice = nowPrice < wasPrice;\r\n }\r\n\r\n return (\r\n \r\n \r\n {friendlyNowPrice}\r\n \r\n {hasLoweredPrice && (\r\n \r\n {friendlyWasPrice}\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nexport default Price;\r\n\r\nconst PriceContainer = styled('div', {\r\n display: 'flex',\r\n variants: {\r\n direction: {\r\n columnReverse: {\r\n flexDirection: 'column-reverse',\r\n rowGap: 4,\r\n },\r\n row: {\r\n flexDirection: 'row',\r\n },\r\n },\r\n size: {\r\n xs: {\r\n fs: 6,\r\n lineHeight: '$lh133',\r\n columnGap: 26,\r\n },\r\n sm: {\r\n fs: 8,\r\n lineHeight: '$lh15',\r\n columnGap: 32,\r\n },\r\n lg: {\r\n columnGap: 40,\r\n fs: 12,\r\n lineHeight: '$lh116',\r\n fontFamily: '$fontPrimary400',\r\n wordSpacing: '$wordSpacings$fontPrimary',\r\n ls: '$ls1',\r\n flexDirection: 'column',\r\n '@mediaMinLarge': {\r\n flexDirection: 'row',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst NowPriceText = styled('span', {\r\n variants: {\r\n hasLoweredPrice: {\r\n true: {\r\n color: '$JE68GreenPrimary',\r\n },\r\n false: {\r\n color: '$secondary2',\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst WasPriceText = styled('span', {\r\n textDecoration: 'line-through',\r\n color: '$secondary2',\r\n variants: {\r\n size: {\r\n lg: {\r\n // Reason why font size is specified here again is because we have special case where size 'lg' and in MOBILE should show different font size.\r\n fs: 9,\r\n lineHeight: '$lh133',\r\n '@mediaMinLarge': {\r\n fontSize: 'inherit',\r\n lineHeight: 'inherit',\r\n },\r\n },\r\n sm: {},\r\n xs: {},\r\n },\r\n },\r\n});\r\n","import { CSS } from '@stitches/react';\r\nimport { styled } from 'stitches.config';\r\n\r\ntype PropType = {\r\n text: string;\r\n css?: CSS;\r\n};\r\n\r\nfunction ProductTag({ text, css = { top: 8, left: -8 } }: PropType) {\r\n if (!text) return <>;\r\n\r\n return {text};\r\n}\r\n\r\nexport default ProductTag;\r\n\r\nconst ProductTagContainer = styled('span', {\r\n backgroundColor: '$campaignLabelBackground',\r\n color: '$campaignLabelText',\r\n fontFamily: '$fontSecondary500',\r\n fs: 6,\r\n lineHeight: '$lh133',\r\n textAlign: 'center',\r\n px: 2,\r\n py: 0.5,\r\n position: 'absolute',\r\n top: 8,\r\n left: -8,\r\n zIndex: '$ProductCardTag',\r\n});\r\n","import KexIconLoader from 'Kex/KexIconLoader';\r\nimport { styled } from 'stitches.config';\r\nimport { timings, animation } from 'Theme/Settings/animation';\r\n\r\ntype PropTypes = {\r\n code: string;\r\n maxQuantity: number;\r\n minQuantity: number;\r\n currentQuantity: number;\r\n handleIncrement: (code: string) => void;\r\n handleDecrement: (code: string) => void;\r\n size?: 'xs' | 's' | 'l';\r\n disabled?: boolean;\r\n disabledMin?: boolean;\r\n};\r\n\r\nfunction QuantitySelector({\r\n code,\r\n maxQuantity,\r\n minQuantity,\r\n currentQuantity,\r\n size,\r\n disabled,\r\n disabledMin,\r\n handleIncrement,\r\n handleDecrement,\r\n}: PropTypes) {\r\n const hasReachedMaxQuantity = currentQuantity === maxQuantity;\r\n const hasReachedMinQuantity = currentQuantity === minQuantity;\r\n\r\n const SubtractIcon = KexIconLoader('Subtract');\r\n const AddIcon = KexIconLoader('Add');\r\n\r\n return (\r\n \r\n handleDecrement(code)}\r\n disabled={hasReachedMinQuantity || disabled || disabledMin}\r\n size={size}\r\n >\r\n \r\n \r\n \r\n {currentQuantity}\r\n \r\n handleIncrement(code)}\r\n disabled={hasReachedMaxQuantity || disabled}\r\n size={size}\r\n >\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nconst BaseQuantityStyle = {\r\n backgroundColor: 'rgba(255,255,255, 0.0263)',\r\n color: '$secondary2',\r\n lineHeight: '$lh125',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n border: '1px solid transparent',\r\n variants: {\r\n disabled: {\r\n true: {\r\n pointerEvents: 'none',\r\n },\r\n },\r\n size: {\r\n xs: {\r\n minW: 8,\r\n h: 8,\r\n },\r\n s: {\r\n minW: 8,\r\n h: 10,\r\n },\r\n l: {\r\n minW: 12,\r\n h: 12,\r\n },\r\n },\r\n },\r\n defaultVariants: {\r\n size: 'xs',\r\n },\r\n};\r\n\r\nconst QuantityWrapper = styled('div', {\r\n display: 'flex',\r\n});\r\n\r\nconst CurrentQuantityWrapper = styled('div', {\r\n ...BaseQuantityStyle,\r\n cursor: 'default',\r\n mx: 0.5,\r\n});\r\n\r\nconst IconWrapper = styled('button', {\r\n ...BaseQuantityStyle,\r\n transition: `all ${timings.oneFifth} ${animation.timingFn}`,\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgba(255,255,255, 0.075)',\r\n },\r\n});\r\n\r\nexport default QuantitySelector;\r\n","import { UpdateQuantity } from 'Shared/Cart/Cart';\r\nimport { useAppSettingsData } from 'Shared/Providers/AppSettingsProvider';\r\n\r\nconst useQuantitySelector = (\r\n currentQuantity: number,\r\n minQuantity: number,\r\n maxQuantity: number\r\n) => {\r\n const { languageRoute } = useAppSettingsData();\r\n const disabledMax = currentQuantity === maxQuantity;\r\n const disabledMin = currentQuantity === minQuantity;\r\n\r\n const handleIncrement = (code: string) => {\r\n if (disabledMax) return;\r\n\r\n UpdateQuantity(code, 1, languageRoute);\r\n };\r\n\r\n const handleDecrement = (code: string) => {\r\n if (disabledMin) return;\r\n\r\n UpdateQuantity(code, -1, languageRoute);\r\n };\r\n\r\n return [handleIncrement, handleDecrement];\r\n};\r\nexport default useQuantitySelector;\r\n","import { useState } from 'react';\r\nimport VariationModel from 'Models/KexVariation/VariationModel.interface';\r\nimport MotorcycleStockModel from 'Models/Variant/MotorcycleStockModel.interface';\r\nimport useProductImage from 'Shared/Hooks/useProductImage';\r\n\r\ntype CartReturnType = {\r\n itemImage: any;\r\n isMotorcycleOutOfStock: boolean;\r\n isConfirmationButtonVisible: boolean;\r\n setIsConfirmationButtonVisible: (arg: boolean) => void;\r\n};\r\n\r\nconst useCartItem = (\r\n product: VariationModel,\r\n motorcycleStock: MotorcycleStockModel\r\n): CartReturnType => {\r\n const [isConfirmationButtonVisible, setIsConfirmationButtonVisible] =\r\n useState(false);\r\n\r\n const { itemImage } = useProductImage(product.image, product.variationImages);\r\n\r\n const isMotorcycleOutOfStock =\r\n product.code === motorcycleStock?.code && !motorcycleStock?.isInStock;\r\n\r\n return {\r\n itemImage,\r\n isMotorcycleOutOfStock,\r\n isConfirmationButtonVisible,\r\n setIsConfirmationButtonVisible,\r\n };\r\n};\r\nexport default useCartItem;\r\n","import { styled } from 'stitches.config';\r\nimport { InfoIcon } from 'Atoms/Icons';\r\nimport Paragraph from 'Atoms/Typography/Paragraph/Paragraph';\r\n\r\ntype PropType = {\r\n soldOut: string;\r\n soldOutContactMail: string;\r\n soldOutContactPhone: string;\r\n};\r\n\r\nconst SoldOut = ({\r\n soldOut,\r\n soldOutContactMail,\r\n soldOutContactPhone,\r\n}: PropType) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {soldOut}\r\n \r\n \r\n {soldOutContactMail}\r\n \r\n \r\n {soldOutContactPhone}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst ErrorContainer = styled('div', {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n mt: 6,\r\n});\r\n\r\nconst Heading = styled('div', {\r\n display: 'flex',\r\n gap: 8,\r\n mb: 4,\r\n});\r\n\r\nconst ParagraphContainer = styled('div', {\r\n mb: 4,\r\n});\r\n\r\nconst ContactLink = styled('a', {\r\n mb: 1,\r\n display: 'block',\r\n color: '$secondary2',\r\n textDecoration: 'underline solid',\r\n textUnderlineOffset: '4px',\r\n});\r\n\r\nconst ErrorMessage = styled('div', {});\r\n\r\nexport default SoldOut;\r\n","import { RemoveIcon } from 'Atoms/Icons';\r\nimport QuantitySelector from 'Atoms/Quantity/QuantitySelector';\r\nimport KexLink from 'Kex/KexLink';\r\nimport VariationModel from 'Models/KexVariation/VariationModel.interface';\r\nimport Price from 'Atoms/Price/Price';\r\nimport { RemoveFromCart } from 'Shared/Cart/Cart';\r\nimport useQuantitySelector from './useQuantitySelector';\r\nimport useCartItem from './useCartItem';\r\nimport { MIN_QUANTITY } from '../../Shared/Common/QuantityLimit';\r\nimport ProductImage from 'Atoms/Image/ProductImage';\r\nimport { GetVariantDescriptions } from 'Shared/Common/VariationHelpers';\r\nimport { styled } from 'stitches.config';\r\nimport { useAppSettingsData } from 'Shared/Providers/AppSettingsProvider';\r\nimport Button from 'Atoms/Buttons/Button';\r\nimport { useTranslationData } from 'Shared/Providers/TranslationProvider';\r\nimport ProductCardTitle from 'Atoms/ProductCardTitle/ProductCardTitle';\r\nimport SoldOut from './SoldOut';\r\nimport { ProductType } from 'Enums/ProductType.enum';\r\nimport MotorcycleStockModel from 'Models/Variant/MotorcycleStockModel.interface';\r\nimport ProductTag from 'Atoms/ProductTag/ProductTag';\r\nimport { useMemo } from 'react';\r\n\r\ntype PropTypes = {\r\n product: VariationModel;\r\n allowEdit: boolean;\r\n isMiniCart: boolean;\r\n needConfirmDelete?: boolean;\r\n motorcycleStock?: MotorcycleStockModel;\r\n};\r\n\r\nfunction CartItemDesktop({\r\n product,\r\n allowEdit,\r\n isMiniCart,\r\n needConfirmDelete = false,\r\n motorcycleStock = {} as MotorcycleStockModel,\r\n}: PropTypes) {\r\n const { languageRoute } = useAppSettingsData();\r\n const {\r\n commonLabels: { abort: abortLabel },\r\n productLabels: {\r\n remove: removeLabel,\r\n confirmDeleteOfParent: confirmDeleteOfParentLabel,\r\n },\r\n cartLabels: { soldOut, soldOutContactMail, soldOutContactPhone },\r\n } = useTranslationData();\r\n\r\n const {\r\n to,\r\n image,\r\n name,\r\n code,\r\n totalNowPrice,\r\n totalWasPrice,\r\n quantity,\r\n isUsed,\r\n stock,\r\n promotion,\r\n productType,\r\n isGift,\r\n } = product;\r\n\r\n const {\r\n itemImage,\r\n isMotorcycleOutOfStock,\r\n isConfirmationButtonVisible,\r\n setIsConfirmationButtonVisible,\r\n } = useCartItem(product, motorcycleStock);\r\n\r\n const [handleIncrement, handleDecrement] = useQuantitySelector(\r\n quantity,\r\n MIN_QUANTITY,\r\n stock.stockQuantity\r\n );\r\n\r\n const variantDescriptions = GetVariantDescriptions(product);\r\n\r\n const isVendorSparePart = productType === ProductType.VENDORSPAREPARTS;\r\n\r\n const imagePreset = useMemo(() => {\r\n if (image && (isUsed || isVendorSparePart)) {\r\n return '?preset=small-product-card-used-desktop';\r\n } else {\r\n return '?preset=small-product-card-desktop';\r\n }\r\n }, [image, isUsed, isVendorSparePart]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n {allowEdit && !isGift && (\r\n {\r\n if (needConfirmDelete) {\r\n setIsConfirmationButtonVisible(true);\r\n } else {\r\n RemoveFromCart(code, languageRoute);\r\n }\r\n }}\r\n >\r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n {variantDescriptions && (\r\n \r\n {variantDescriptions}\r\n \r\n )}\r\n \r\n
\r\n {product.productType !== ProductType.MOTORCYCLES && allowEdit && (\r\n \r\n )}\r\n
\r\n {isConfirmationButtonVisible && (\r\n \r\n \r\n {confirmDeleteOfParentLabel}\r\n \r\n \r\n {\r\n setIsConfirmationButtonVisible(false);\r\n }}\r\n >\r\n {abortLabel}\r\n \r\n {\r\n RemoveFromCart(code, languageRoute);\r\n }}\r\n >\r\n {removeLabel}\r\n \r\n \r\n \r\n )}\r\n
\r\n
\r\n {isMotorcycleOutOfStock && (\r\n \r\n )}\r\n
\r\n );\r\n}\r\n\r\nconst StyledKexLink = styled(KexLink, {\r\n maxW: '80%',\r\n fontFamily: '$fontSecondary600',\r\n wordSpacing: 'unset',\r\n});\r\n\r\nconst ConfirmDelete = styled('div', { marginTop: '32px' });\r\nconst ConfirmDescription = styled('div', {\r\n color: '$textPrimary',\r\n});\r\nconst ButtonWrapper = styled('div', {\r\n display: 'flex',\r\n marginTop: '16px',\r\n gap: '16px',\r\n});\r\n\r\nconst CartItemContainer = styled('div', {\r\n display: 'flex',\r\n position: 'relative',\r\n flexWrap: 'wrap',\r\n '&:not(:last-child)': {\r\n py: 5,\r\n borderBottomWidth: '1px',\r\n borderBottomColor: '$checkoutPageBackgroundPrimary',\r\n },\r\n '&:last-child': {\r\n pt: 5,\r\n mb: 6,\r\n },\r\n variants: {\r\n isMiniCart: {\r\n true: {\r\n '&:not(:last-child)': {\r\n py: 5,\r\n borderBottomWidth: '1px',\r\n borderBottomColor: '$primary2',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst CartItemTop = styled('div', {\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n flexGrow: 1,\r\n});\r\n\r\nconst ImageContainer = styled('div', {\r\n width: 104,\r\n height: 80,\r\n mr: 4,\r\n variants: {\r\n isMotorcycleOutOfStock: {\r\n true: { opacity: 0.4 },\r\n false: { opacity: 1 },\r\n },\r\n },\r\n});\r\n\r\nconst TopWrapper = styled('div', {\r\n display: 'flex',\r\n alignItems: 'baseline',\r\n justifyContent: 'space-between',\r\n});\r\n\r\nconst BottomWrapper = styled('div', {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'flex-end',\r\n});\r\n\r\nconst Details = styled('div', {\r\n flexGrow: 1,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n});\r\n\r\nconst ProductVariantDescription = styled('span', {\r\n fs: 6,\r\n display: 'block',\r\n mb: 2,\r\n color: '$cartItemText',\r\n});\r\n\r\nconst RemoveButton = styled('button', {\r\n display: 'flex',\r\n cursor: 'pointer',\r\n alignItems: 'center',\r\n});\r\n\r\nexport default CartItemDesktop;\r\n","import { RemoveIcon } from 'Atoms/Icons';\r\nimport QuantitySelector from 'Atoms/Quantity/QuantitySelector';\r\nimport VariationModel from 'Models/KexVariation/VariationModel.interface';\r\nimport Price from 'Atoms/Price/Price';\r\nimport { RemoveFromCart } from 'Shared/Cart/Cart';\r\nimport { ProductType } from 'Enums/ProductType.enum';\r\nimport ProductImage from 'Atoms/Image/ProductImage';\r\n\r\nimport { styled } from 'stitches.config';\r\nimport KexLink from 'Kex/KexLink';\r\nimport useQuantitySelector from './useQuantitySelector';\r\nimport useCartItem from './useCartItem';\r\nimport { MIN_QUANTITY } from '../../Shared/Common/QuantityLimit';\r\nimport { useAppSettingsData } from 'Shared/Providers/AppSettingsProvider';\r\nimport Button from 'Atoms/Buttons/Button';\r\nimport { useTranslationData } from 'Shared/Providers/TranslationProvider';\r\nimport { GetVariantDescriptions } from 'Shared/Common/VariationHelpers';\r\nimport ProductCardTitle from 'Atoms/ProductCardTitle/ProductCardTitle';\r\nimport SoldOut from './SoldOut';\r\nimport MotorcycleStockModel from 'Models/Variant/MotorcycleStockModel.interface';\r\nimport ProductTag from 'Atoms/ProductTag/ProductTag';\r\nimport { useMemo } from 'react';\r\n\r\ntype PropTypes = {\r\n product: VariationModel;\r\n allowEdit?: boolean;\r\n isMiniCart?: boolean;\r\n needConfirmDelete?: boolean;\r\n motorcycleStock?: MotorcycleStockModel;\r\n};\r\n\r\nfunction CartItemMobile({\r\n product,\r\n allowEdit,\r\n isMiniCart = false,\r\n needConfirmDelete = false,\r\n motorcycleStock = {} as MotorcycleStockModel,\r\n}: PropTypes) {\r\n const { languageRoute } = useAppSettingsData();\r\n const {\r\n to,\r\n image,\r\n name,\r\n code,\r\n totalNowPrice,\r\n totalWasPrice,\r\n quantity,\r\n isUsed,\r\n stock,\r\n promotion,\r\n productType,\r\n isGift,\r\n } = product;\r\n\r\n const {\r\n commonLabels: { abort: abortLabel },\r\n productLabels: {\r\n remove: removeLabel,\r\n confirmDeleteOfParent: confirmDeleteOfParentLabel,\r\n },\r\n cartLabels: { soldOut, soldOutContactMail, soldOutContactPhone },\r\n } = useTranslationData();\r\n\r\n const {\r\n itemImage,\r\n isMotorcycleOutOfStock,\r\n isConfirmationButtonVisible,\r\n setIsConfirmationButtonVisible,\r\n } = useCartItem(product, motorcycleStock);\r\n\r\n const [handleIncrement, handleDecrement] = useQuantitySelector(\r\n quantity,\r\n MIN_QUANTITY,\r\n stock.stockQuantity\r\n );\r\n\r\n const variantDescriptions = GetVariantDescriptions(product);\r\n\r\n const isVendorSparePart = productType === ProductType.VENDORSPAREPARTS;\r\n\r\n const imagePreset = useMemo(() => {\r\n if (image && (isUsed || isVendorSparePart)) {\r\n return '?preset=small-product-card-used-desktop';\r\n } else {\r\n return '?preset=small-product-card-desktop';\r\n }\r\n }, [image, isUsed, isVendorSparePart]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {variantDescriptions && (\r\n \r\n {variantDescriptions}\r\n \r\n )}\r\n \r\n \r\n \r\n\r\n {allowEdit && (\r\n <>\r\n \r\n {!isGift ? (\r\n {\r\n if (needConfirmDelete) {\r\n setIsConfirmationButtonVisible(true);\r\n } else {\r\n RemoveFromCart(code, languageRoute);\r\n }\r\n }}\r\n >\r\n \r\n \r\n ) : (\r\n
\r\n )}\r\n\r\n {product.productType !== ProductType.MOTORCYCLES && allowEdit && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n {isConfirmationButtonVisible && (\r\n \r\n \r\n {confirmDeleteOfParentLabel}\r\n \r\n \r\n {\r\n setIsConfirmationButtonVisible(false);\r\n }}\r\n >\r\n {abortLabel}\r\n \r\n {\r\n RemoveFromCart(code, languageRoute);\r\n }}\r\n >\r\n {removeLabel}\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n {isMotorcycleOutOfStock && (\r\n \r\n )}\r\n
\r\n );\r\n}\r\n\r\nconst CartItemContainer = styled('div', {\r\n position: 'relative',\r\n '&::not(:last-of-type)::after': {\r\n content: '\"\"',\r\n position: 'absolute',\r\n w: '100%',\r\n my: 0,\r\n mx: 'auto',\r\n display: 'block',\r\n backgroundColor: '$cartItemBackgroundPrimary',\r\n h: 0.25,\r\n bottom: 0,\r\n opacity: 0.5,\r\n },\r\n flexDirection: 'row',\r\n lineHeight: '$lh15',\r\n '&:not(:last-child)': {\r\n pb: 4,\r\n borderBottomWidth: '1px',\r\n borderBottomColor: '$checkoutPageBackgroundPrimary',\r\n },\r\n '&:last-child': {\r\n pt: 4,\r\n mb: 4,\r\n },\r\n variants: {\r\n isMiniCart: {\r\n true: {\r\n '&:not(:last-child)': {\r\n py: 5,\r\n borderBottomWidth: '1px',\r\n borderBottomColor: '$primary2',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst StyledKexLink = styled(KexLink, {\r\n mb: 4,\r\n maxW: '80%',\r\n fontFamily: '$fontSecondary600',\r\n wordSpacing: 'unset',\r\n});\r\n\r\nconst ImageContainer = styled('div', {\r\n width: '104px',\r\n height: '80px',\r\n mr: 2,\r\n variants: {\r\n allowEdit: {\r\n true: {\r\n mb: 6,\r\n },\r\n },\r\n isMotorcycleOutOfStock: {\r\n true: { opacity: 0.4 },\r\n false: { opacity: 1 },\r\n },\r\n },\r\n\r\n flexShrink: 0,\r\n});\r\n\r\nconst CartItemContent = styled('div', {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flex: 1,\r\n});\r\n\r\nconst CartItemTop = styled('div', {\r\n display: 'flex',\r\n});\r\n\r\nconst CartItemBottom = styled('div', {\r\n mt: 4,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n});\r\n\r\nconst ProductVariantDescription = styled('span', {\r\n fs: 6,\r\n color: '$cartItemText',\r\n display: 'block',\r\n mb: 2,\r\n});\r\n\r\nconst RemoveButton = styled('button', {\r\n width: 96,\r\n display: 'flex',\r\n justifyContent: 'center',\r\n});\r\n\r\nconst ConfirmDelete = styled('div', { marginTop: '32px' });\r\nconst ConfirmDescription = styled('div', {\r\n color: '$textPrimary',\r\n});\r\nconst ButtonWrapper = styled('div', {\r\n display: 'flex',\r\n marginTop: '16px',\r\n gap: '16px',\r\n});\r\n\r\nexport default CartItemMobile;\r\n","import { H4 } from 'Atoms/Typography/Headings/Heading';\r\nimport VariationModel from 'Models/KexVariation/VariationModel.interface';\r\nimport CartItemDesktop from 'Organisms/CartItem/CartItemDesktop';\r\nimport CartItemMobile from 'Organisms/CartItem/CartItemMobile';\r\nimport useMedia from 'Shared/Hooks/useMedia';\r\nimport { useTranslationData } from 'Shared/Providers/TranslationProvider';\r\nimport { styled } from 'stitches.config';\r\nimport MotorcycleStockModel from 'Models/Variant/MotorcycleStockModel.interface';\r\nimport { GetMotorcycleStock } from 'Shared/Cart/Stock';\r\nimport { mediaQueryTypes } from 'Theme/Settings/mediaQueries';\r\nimport { useMemo } from 'react';\r\n\r\ntype PropTypes = {\r\n products: VariationModel[];\r\n isLoading?: boolean;\r\n allowEdit?: boolean;\r\n isMiniCart?: boolean;\r\n};\r\n\r\ntype PropTypesCartItem = {\r\n product: VariationModel;\r\n allowEdit?: boolean;\r\n isMiniCart?: boolean;\r\n isMobile: boolean;\r\n childKey?: string;\r\n needConfirmDelete?: boolean;\r\n motorcycleStock?: MotorcycleStockModel;\r\n};\r\n\r\nfunction setOrAdd(map: Map, key: T, value: S) {\r\n const existingValues = map.get(key);\r\n map.set(key, existingValues ? [...existingValues, value] : [value]);\r\n}\r\n\r\ntype CartEntry =\r\n | { type: 'singular'; models: VariationModel }\r\n | { type: 'named'; name: string; models: VariationModel[] }\r\n | { type: 'parent'; parent: VariationModel; models: VariationModel[] };\r\n\r\nconst CartItem = ({\r\n isMobile = true,\r\n product,\r\n childKey = '',\r\n isMiniCart = false,\r\n allowEdit = false,\r\n needConfirmDelete = false,\r\n motorcycleStock,\r\n}: PropTypesCartItem) => {\r\n return isMobile ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction ProductList({\r\n products,\r\n isLoading = false,\r\n allowEdit = false,\r\n isMiniCart = false,\r\n}: PropTypes) {\r\n const {\r\n commonLabels: { loading },\r\n productLabels: { partsTo },\r\n } = useTranslationData();\r\n const isMobile = useMedia(mediaQueryTypes.mediaMaxLarge);\r\n\r\n const { motorcycleStock } = GetMotorcycleStock();\r\n\r\n const groupedAndUngroupedProducts = useMemo((): CartEntry[] => {\r\n const articleNumbers = new Map(\r\n products.map((p) => [p.articleNumber, p] as const)\r\n );\r\n\r\n const mp = new Map();\r\n const parents = new Map();\r\n const others: VariationModel[] = [];\r\n\r\n products.forEach((item) => {\r\n if (\r\n !item.belongsToMotorcycleArtNr ||\r\n item.belongsToMotorcycleArtNr === item.articleNumber\r\n ) {\r\n others.push(item);\r\n } else {\r\n const parent = articleNumbers.get(item.belongsToMotorcycleArtNr);\r\n\r\n if (parent) {\r\n if (parent !== item) {\r\n setOrAdd(parents, parent, item);\r\n }\r\n } else {\r\n setOrAdd(mp, item.belongsToMotorcycleArtNr, item);\r\n }\r\n }\r\n });\r\n\r\n return [\r\n ...Array.from(\r\n parents,\r\n ([key, value]) =>\r\n ({\r\n type: 'parent',\r\n parent: key,\r\n models: value,\r\n } as const)\r\n ),\r\n ...Array.from(\r\n mp,\r\n ([key, value]) =>\r\n ({\r\n type: 'named',\r\n name: key,\r\n models: value,\r\n } as const)\r\n ),\r\n ...others\r\n .filter((p) => !parents.has(p))\r\n .map((p) => ({ type: 'singular', models: p } as const)),\r\n ];\r\n }, [products]);\r\n\r\n const renderContent = () => {\r\n return groupedAndUngroupedProducts\r\n .filter(\r\n (entry) =>\r\n // removes null product and empty parent products\r\n !!entry.models && (entry.type === 'singular' || !!entry.models.length)\r\n )\r\n .map((product, index) => {\r\n if (product.type === 'singular') {\r\n const uniqueIdx = product.models.code + product.models.isGift;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (product.type === 'named') {\r\n return (\r\n
\r\n \r\n \r\n \r\n

\r\n {partsTo} {product.name}\r\n

\r\n
\r\n
\r\n {product.models.map((groupedProduct) => {\r\n const uniqueIdx = groupedProduct.code + groupedProduct.isGift;\r\n return (\r\n \r\n );\r\n })}\r\n
\r\n
\r\n );\r\n }\r\n\r\n const uniqueIdx = product.parent.code + product.parent.isGift;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n

\r\n {partsTo} {product.parent.name}\r\n

\r\n
\r\n
\r\n {product.models.map((groupedProduct) => {\r\n const uniqueIdx = groupedProduct.code + groupedProduct.isGift;\r\n return (\r\n \r\n );\r\n })}\r\n
\r\n
\r\n );\r\n });\r\n };\r\n\r\n return isLoading ?

{loading}

: <>{renderContent()};\r\n}\r\n\r\nconst ProductGroupContainer = styled('div', {\r\n backgroundColor: '$primary3',\r\n paddingBottom: '1px',\r\n mb: 1,\r\n});\r\n\r\nconst HeaderWrapper = styled('div', {\r\n paddingTop: '32px',\r\n paddingBottom: '12px',\r\n});\r\n\r\nconst ItemWrapper = styled('div', {\r\n px: 4,\r\n variants: {\r\n isMiniCart: {\r\n true: {\r\n '@mediaMinLarge': {\r\n px: 6,\r\n },\r\n },\r\n false: {\r\n '@mediaMinLarge': {\r\n px: 8,\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport default ProductList;\r\n","import { useEffect, useState } from 'react';\r\nimport MotorcycleStockModel from 'Models/Variant/MotorcycleStockModel.interface';\r\nimport Fetcher from 'Shared/Common/Fetcher';\r\nimport { useAppSettingsData } from 'Shared/Providers/AppSettingsProvider';\r\nimport useSWR from 'swr';\r\n\r\nlet abortController: AbortController = new AbortController();\r\nlet hasMounted = false;\r\nlet cartUrl = '/api/cart/';\r\n\r\ntype CartReturnType = {\r\n motorcycleStock: MotorcycleStockModel;\r\n};\r\n\r\nexport function GetMotorcycleStock(): CartReturnType {\r\n const tempCartObject: MotorcycleStockModel = {} as MotorcycleStockModel;\r\n const [motorcycleStock, setCart] =\r\n useState(tempCartObject);\r\n const { pageCacheTime } = useAppSettingsData();\r\n const { data } = useSWR(\r\n `${cartUrl}IsMotorcycleInStock`,\r\n FetchMotorcycleStock,\r\n {\r\n fallbackData: undefined,\r\n revalidateOnFocus: false,\r\n dedupingInterval: pageCacheTime,\r\n }\r\n );\r\n\r\n useEffect(() => {\r\n if (!hasMounted) {\r\n hasMounted = true;\r\n } else {\r\n if (data) {\r\n setCart(data);\r\n }\r\n }\r\n }, [data]);\r\n\r\n return { motorcycleStock };\r\n}\r\n\r\nfunction FetchMotorcycleStock(url: string) {\r\n abortController.abort();\r\n abortController = new AbortController();\r\n const signal = abortController.signal;\r\n return Fetcher(\r\n url,\r\n signal,\r\n (data, resolve) => {\r\n resolve(data.motorcycleStock.result);\r\n },\r\n false\r\n );\r\n}\r\n","export const MIN_QUANTITY = 0;\r\nexport const MAX_QUANTITY = 50;\r\n","import VariationModel from 'Models/KexVariation/VariationModel.interface';\r\n\r\nexport const GetVariantDescriptions = (variation: VariationModel) => {\r\n const descriptions = [];\r\n\r\n if (!variation) return;\r\n\r\n if (variation.color && variation.color.name) {\r\n descriptions.push(variation.color.name);\r\n }\r\n\r\n if (variation.size && variation.size.name) {\r\n descriptions.push(variation.size.name);\r\n }\r\n return descriptions.join(', ');\r\n};\r\n","import { isEmpty } from 'Shared/Common/Helpers';\r\nimport ImageModel from 'Models/Assets/ImageModel.interface';\r\nimport { useAppSettingsData } from 'Shared/Providers/AppSettingsProvider';\r\n\r\nconst useProductImage = (image: ImageModel, variationImages: ImageModel[]) => {\r\n const { missingImage } = useAppSettingsData();\r\n\r\n let itemImage = image;\r\n if (isEmpty(image) && !isEmpty(variationImages)) {\r\n itemImage = variationImages[0];\r\n }\r\n\r\n if (isEmpty(itemImage)) {\r\n itemImage = missingImage;\r\n }\r\n\r\n return { itemImage };\r\n};\r\n\r\nexport default useProductImage;\r\n"],"names":["nowPrice","wasPrice","friendlyNowPrice","friendlyWasPrice","size","direction","nowPriceSize","wasPriceSize","hasLoweredPrice","PriceContainer","NowPriceText","css","WasPriceText","styled","display","variants","columnReverse","flexDirection","rowGap","row","xs","fs","lineHeight","columnGap","sm","lg","fontFamily","wordSpacing","ls","true","color","false","textDecoration","fontSize","text","top","left","ProductTagContainer","backgroundColor","textAlign","px","py","position","zIndex","BaseQuantityStyle","alignItems","justifyContent","border","disabled","pointerEvents","minW","h","s","l","defaultVariants","QuantityWrapper","CurrentQuantityWrapper","cursor","mx","IconWrapper","transition","timings","animation","code","maxQuantity","minQuantity","currentQuantity","disabledMin","handleIncrement","handleDecrement","hasReachedMaxQuantity","hasReachedMinQuantity","SubtractIcon","KexIconLoader","AddIcon","onClick","languageRoute","useAppSettingsData","disabledMax","UpdateQuantity","product","motorcycleStock","useState","isConfirmationButtonVisible","setIsConfirmationButtonVisible","itemImage","useProductImage","image","variationImages","isMotorcycleOutOfStock","isInStock","ErrorContainer","mt","Heading","gap","mb","ParagraphContainer","ContactLink","textUnderlineOffset","ErrorMessage","soldOut","soldOutContactMail","soldOutContactPhone","Paragraph","href","StyledKexLink","KexLink","maxW","ConfirmDelete","marginTop","ConfirmDescription","ButtonWrapper","CartItemContainer","flexWrap","borderBottomWidth","borderBottomColor","pt","isMiniCart","CartItemTop","flexGrow","ImageContainer","width","height","mr","opacity","TopWrapper","BottomWrapper","Details","ProductVariantDescription","RemoveButton","allowEdit","needConfirmDelete","useTranslationData","abortLabel","commonLabels","abort","productLabels","removeLabel","remove","confirmDeleteOfParentLabel","confirmDeleteOfParent","cartLabels","to","name","totalNowPrice","totalWasPrice","quantity","isUsed","stock","promotion","productType","isGift","useCartItem","useQuantitySelector","MIN_QUANTITY","stockQuantity","variantDescriptions","GetVariantDescriptions","isVendorSparePart","ProductType","imagePreset","useMemo","ProductTag","promotionName","underlined","ProductImage","src","alt","ProductCardTitle","title","RemoveFromCart","Price","priceRoundedAsString","price","QuantitySelector","Button","type","content","w","my","bottom","pb","flexShrink","CartItemContent","flex","CartItemBottom","setOrAdd","map","key","value","existingValues","get","set","CartItem","isMobile","childKey","ItemWrapper","ProductGroupContainer","paddingBottom","HeaderWrapper","paddingTop","products","isLoading","loading","partsTo","useMedia","mediaQueryTypes","GetMotorcycleStock","groupedAndUngroupedProducts","articleNumbers","Map","p","articleNumber","mp","parents","others","forEach","item","belongsToMotorcycleArtNr","parent","push","Array","from","models","filter","has","entry","length","index","uniqueIdx","H4","groupedProduct","abortController","AbortController","hasMounted","setCart","pageCacheTime","data","useSWR","FetchMotorcycleStock","fallbackData","undefined","revalidateOnFocus","dedupingInterval","useEffect","url","signal","Fetcher","resolve","result","variation","descriptions","join","missingImage","isEmpty"],"sourceRoot":""}