@bytebrand/fe-ui-core-autobahn 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (621) hide show
  1. package/assets/autode-logo.svg +6 -6
  2. package/cards/CarCard.tsx +174 -174
  3. package/cards/CarRow.tsx +186 -182
  4. package/cards/cardParts.tsx +529 -489
  5. package/cards/index.ts +37 -35
  6. package/cards/types.ts +124 -114
  7. package/chrome/Footer.tsx +189 -189
  8. package/chrome/TopBar.tsx +405 -405
  9. package/chrome/index.ts +20 -20
  10. package/chrome/svg.d.ts +11 -11
  11. package/compat/AccardionSection/AccardionSection.styl +45 -45
  12. package/compat/AccardionSection/AccardionSection.tsx +56 -56
  13. package/compat/AccordionWidget/AccordionWidget.styl +220 -220
  14. package/compat/AccordionWidget/AccordionWidget.tsx +257 -257
  15. package/compat/AccordionWrapper/AccordionItem/AccordionItem.styl +34 -34
  16. package/compat/AccordionWrapper/AccordionItem/AccordionItem.tsx +64 -64
  17. package/compat/AccordionWrapper/AccordionWrapper.tsx +34 -34
  18. package/compat/AdvantageItem/AdvantageItem.styl +47 -47
  19. package/compat/AdvantageItem/AdvantageItem.tsx +26 -26
  20. package/compat/Alternative/DealerInfo.styl +116 -116
  21. package/compat/Alternative/DealerInfo.tsx +171 -171
  22. package/compat/Badge/Badge.styl +44 -44
  23. package/compat/Badge/Badge.tsx +25 -25
  24. package/compat/BodyTypeIcons/Audi.tsx +9 -9
  25. package/compat/BodyTypeIcons/Bmw.tsx +860 -860
  26. package/compat/BodyTypeIcons/Ford.tsx +31 -31
  27. package/compat/BodyTypeIcons/IconsConfig.tsx +44 -44
  28. package/compat/BodyTypeIcons/IconsConfigCompact.tsx +30 -30
  29. package/compat/BodyTypeIcons/Mazda.tsx +44 -44
  30. package/compat/BodyTypeIcons/MercedesBenz.tsx +38 -38
  31. package/compat/BodyTypeIcons/Opel.tsx +19 -19
  32. package/compat/BodyTypeIcons/Search.tsx +19 -19
  33. package/compat/BodyTypeIcons/SelectorCategoryCombi.tsx +68 -68
  34. package/compat/BodyTypeIcons/SelectorCategoryCompact.tsx +20 -20
  35. package/compat/BodyTypeIcons/SelectorCategoryConvertible.tsx +68 -68
  36. package/compat/BodyTypeIcons/SelectorCategoryCoupe.tsx +60 -60
  37. package/compat/BodyTypeIcons/SelectorCategoryMinibus.tsx +64 -64
  38. package/compat/BodyTypeIcons/SelectorCategorySedan.tsx +69 -69
  39. package/compat/BodyTypeIcons/SelectorCategorySuv.tsx +77 -77
  40. package/compat/BodyTypeIcons/SelectorCategoryTransporter.tsx +68 -68
  41. package/compat/BodyTypeIcons/SelectorCategoryVan.tsx +72 -72
  42. package/compat/BodyTypeIcons/Volkswagen.tsx +330 -330
  43. package/compat/BodyTypeIcons/index.ts +17 -17
  44. package/compat/Button/Button.tsx +65 -65
  45. package/compat/ButtonOld/Button.styl +65 -65
  46. package/compat/ButtonOld/Button.tsx +84 -84
  47. package/compat/Checkbox/Checkbox.styl +119 -119
  48. package/compat/Checkbox/Checkbox.tsx +151 -151
  49. package/compat/Checkbox/FormCheckbox.styl +22 -22
  50. package/compat/Checkbox/FormCheckbox.tsx +86 -86
  51. package/compat/Co2Widget/CO2Efficiency.styl +219 -219
  52. package/compat/Co2Widget/CO2Efficiency.tsx +93 -93
  53. package/compat/ContactInfo/ContactInfo.styl +22 -22
  54. package/compat/ContactInfo/ContactInfo.tsx +161 -161
  55. package/compat/ContactInfo/TemporaryTranslation.ts +11 -11
  56. package/compat/CookieModal/CookieModal.tsx +49 -49
  57. package/compat/CookieModal/Modal.tsx +43 -43
  58. package/compat/CookieModal/ModalsConfig.tsx +23 -23
  59. package/compat/CookieModal/modals/ManageCookieModal/ManageCookieModal.styl +86 -86
  60. package/compat/CookieModal/modals/ManageCookieModal/ManageCookieModal.tsx +184 -184
  61. package/compat/CookieModal/modals/PreviewCookieModal/PreviewCookieModal.styl +66 -66
  62. package/compat/CookieModal/modals/PreviewCookieModal/PreviewCookieModal.tsx +51 -51
  63. package/compat/CookieModal/modals/TestModal.tsx +7 -7
  64. package/compat/CookieModal/useModal.ts +13 -13
  65. package/compat/CustomerQuote/CustomerQuote.styl +79 -79
  66. package/compat/CustomerQuote/CustomerQuote.tsx +68 -68
  67. package/compat/CustomerQuotesSlider/CustomerQuotesSlider.styl +46 -46
  68. package/compat/CustomerQuotesSlider/CustomerQuotesSlider.tsx +79 -79
  69. package/compat/CustomerQuotesSlider/SliderArrow.tsx +20 -20
  70. package/compat/CustomerQuotesSlider/slider.global.styl +2 -2
  71. package/compat/ExpansionPanel/ExpansionPanel.tsx +68 -68
  72. package/compat/FirstInfoBlock/FirstInfoBlock.styl +33 -33
  73. package/compat/FirstInfoBlock/FirstInfoBlock.tsx +49 -49
  74. package/compat/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +66 -66
  75. package/compat/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.tsx +21 -21
  76. package/compat/FormattedNumber/FormattedNumber.styl +1 -1
  77. package/compat/FormattedNumber/FormattedNumber.tsx +90 -90
  78. package/compat/IconContainer/IconContainer.styl +23 -23
  79. package/compat/IconContainer/IconContainer.tsx +34 -34
  80. package/compat/Image/Image.styl +109 -109
  81. package/compat/Image/Image.tsx +302 -302
  82. package/compat/ImageSettings/EditableOptionsTable/CustomCheckbox/CustomCheckbox.styl +7 -7
  83. package/compat/ImageSettings/EditableOptionsTable/CustomCheckbox/CustomCheckbox.tsx +30 -30
  84. package/compat/ImageSettings/EditableOptionsTable/EditableOptionsTable.styl +122 -122
  85. package/compat/ImageSettings/EditableOptionsTable/EditableOptionsTable.tsx +199 -199
  86. package/compat/ImageSettings/EditableOptionsTable/ImageIcon/ImageIcon.styl +3 -3
  87. package/compat/ImageSettings/EditableOptionsTable/ImageIcon/ImageIcon.tsx +15 -15
  88. package/compat/ImageSettings/OptionsTable/OptionsTable.styl +47 -47
  89. package/compat/ImageSettings/OptionsTable/OptionsTable.tsx +122 -122
  90. package/compat/ImageSettings/PricePlan/PricePlan.styl +63 -63
  91. package/compat/ImageSettings/PricePlan/PricePlan.tsx +32 -32
  92. package/compat/ImageSettings/index.ts +42 -42
  93. package/compat/ImagesSet/ImagesSet.styl +27 -27
  94. package/compat/ImagesSet/ImagesSet.tsx +76 -76
  95. package/compat/InfoBlockWrapper/InfoBlockWrapper.styl +41 -41
  96. package/compat/InfoBlockWrapper/InfoBlockWrapper.tsx +46 -46
  97. package/compat/Loader/Loader.styl +39 -39
  98. package/compat/Loader/Loader.tsx +32 -32
  99. package/compat/MagnifyGlass/MagnifyGlass.styl +33 -33
  100. package/compat/MagnifyGlass/MagnifyGlass.tsx +213 -213
  101. package/compat/MdAccordionGroup/MdAccordionGroup.tsx +53 -53
  102. package/compat/MdCheckbox/MdCheckbox.tsx +69 -69
  103. package/compat/MdField/MdField.tsx +100 -100
  104. package/compat/MdSelect/MdSelect.tsx +103 -103
  105. package/compat/MdSwitch/MdSwitch.tsx +29 -29
  106. package/compat/MdTabs/MdTabs.tsx +47 -47
  107. package/compat/MdTooltip/MdTooltip.tsx +31 -31
  108. package/compat/OfferDetailedSection/OfferDetailedSection.styl +31 -31
  109. package/compat/OfferDetailedSection/OfferDetailedSection.tsx +100 -100
  110. package/compat/OfferDetailedSection/partials/PanelConfig.styl +131 -131
  111. package/compat/OfferDetailedSection/partials/PanelConfig.tsx +121 -121
  112. package/compat/OfferPanel/AboAccordion/AboAccordion.styl +24 -24
  113. package/compat/OfferPanel/AboAccordion/AboAccordion.tsx +128 -128
  114. package/compat/OfferPanel/AboAccordion/AboColorOptions/AboColorOptions.styl +11 -11
  115. package/compat/OfferPanel/AboAccordion/AboColorOptions/AboColorOptions.tsx +35 -35
  116. package/compat/OfferPanel/AboAccordion/AboFaq/AboFaq.styl +20 -20
  117. package/compat/OfferPanel/AboAccordion/AboFaq/AboFaq.tsx +25 -25
  118. package/compat/OfferPanel/AboAccordion/AboIncludedServices/AboIncludedServices.styl +13 -13
  119. package/compat/OfferPanel/AboAccordion/AboIncludedServices/AboIncludedServices.tsx +39 -39
  120. package/compat/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +42 -42
  121. package/compat/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +140 -140
  122. package/compat/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +144 -144
  123. package/compat/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +23 -23
  124. package/compat/OfferPanel/OfferPanel.styl +193 -193
  125. package/compat/OfferPanel/OfferPanel.tsx +81 -81
  126. package/compat/OfferPanel/OfferPeriod/OfferPeriod.styl +24 -24
  127. package/compat/OfferPanel/OfferPeriod/OfferPeriod.tsx +45 -45
  128. package/compat/OfferPanel/RangeGroup/RangeGroup.tsx +39 -39
  129. package/compat/OfferRequestButtonWrapper/OfferRequestButtonWrapper.styl +119 -119
  130. package/compat/OfferRequestButtonWrapper/OfferRequestButtonWrapper.styled.tsx +33 -33
  131. package/compat/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +122 -122
  132. package/compat/PriceRating/PriceRating.styl +47 -47
  133. package/compat/PriceRating/PriceRating.tsx +64 -64
  134. package/compat/PriceRatingDetailed/PriceRatingDetailed.styl +120 -120
  135. package/compat/PriceRatingDetailed/PriceRatingDetailed.tsx +191 -191
  136. package/compat/PricingToolBlock/PricingTool.styl +6 -6
  137. package/compat/PricingToolBlock/PricingTool.tsx +29 -29
  138. package/compat/Radio/Radio.styl +115 -115
  139. package/compat/Radio/Radio.tsx +141 -141
  140. package/compat/Radio/RadioGroup.styl +5 -5
  141. package/compat/Radio/RadioGroup.tsx +65 -65
  142. package/compat/Range/Range.tsx +79 -79
  143. package/compat/RateSearchValue/RateSearchValue.styl +22 -22
  144. package/compat/RateSearchValue/RateSearchValue.tsx +55 -55
  145. package/compat/RateSearchWidget/RateSearchWidget.styl +106 -106
  146. package/compat/RateSearchWidget/RateSearchWidget.tsx +163 -163
  147. package/compat/ServiceBlockItem/ServiceBlockItem.styl +47 -47
  148. package/compat/ServiceBlockItem/ServiceBlockItem.tsx +25 -25
  149. package/compat/SkeletonItem/SkeletonItem.styl +80 -80
  150. package/compat/SkeletonItem/SkeletonItem.tsx +80 -80
  151. package/compat/StarButton/StarButton.styl +39 -39
  152. package/compat/StarButton/StarButton.tsx +31 -31
  153. package/compat/TabPanel/TabPanel.tsx +28 -28
  154. package/compat/TimePicker/TimePicker.styl +22 -22
  155. package/compat/TimePicker/TimePicker.tsx +156 -156
  156. package/compat/Tooltip/Tooltip.styl +117 -117
  157. package/compat/Tooltip/Tooltip.tsx +63 -63
  158. package/compat/Usp/Usp.styl +78 -78
  159. package/compat/Usp/Usp.tsx +30 -30
  160. package/compat/Usp/uspTranslate.ts +12 -12
  161. package/compat/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +36 -36
  162. package/compat/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +178 -178
  163. package/compat/VehicleDetailedSidebar/partials/Price.styl +27 -27
  164. package/compat/VehicleDetailedSidebar/partials/Price.tsx +41 -41
  165. package/compat/VehicleDetailedSidebar/partials/PriceContent.styl +123 -123
  166. package/compat/VehicleDetailedSidebar/partials/PriceContent.tsx +128 -128
  167. package/compat/VehicleDetailedSidebar/partials/Properties.styl +58 -58
  168. package/compat/VehicleDetailedSidebar/partials/Properties.tsx +155 -155
  169. package/compat/VehicleDetailedSidebar/partials/Title.styl +35 -35
  170. package/compat/VehicleDetailedSidebar/partials/Title.tsx +33 -33
  171. package/compat/VehicleDetailedSlider/VehicleDetailedSlider.styl +146 -146
  172. package/compat/VehicleDetailedSlider/VehicleDetailedSlider.tsx +382 -382
  173. package/compat/VehicleDetailedSlider/partials/MobileStast.tsx +61 -61
  174. package/compat/VehicleDetailedSlider/partials/MobileStats.styl +71 -71
  175. package/compat/VehicleDetailedSlider/partials/PriceData.styl +50 -50
  176. package/compat/VehicleDetailedSlider/partials/PriceData.tsx +67 -67
  177. package/compat/VehicleDetailedSlider/partials/Stats.styl +80 -80
  178. package/compat/VehicleDetailedSlider/partials/Stats.tsx +62 -62
  179. package/compat/VehicleDetailedSlider/partials/Title.styl +44 -44
  180. package/compat/VehicleDetailedSlider/partials/Title.tsx +36 -36
  181. package/compat/VehicleFormattedPrice/VehicleFormattedPrice.styl +148 -148
  182. package/compat/VehicleFormattedPrice/VehicleFormattedPrice.tsx +163 -163
  183. package/compat/VehicleSlider/VehicleSlider.styl +62 -62
  184. package/compat/VehicleSlider/VehicleSlider.tsx +125 -125
  185. package/compat/VehicleSlider/VehicleSliderForSRL.tsx +175 -175
  186. package/compat/VehicleSmallCard/SeoText/SeoText.styl +8 -8
  187. package/compat/VehicleSmallCard/SeoText/SeoText.tsx +16 -16
  188. package/compat/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +204 -204
  189. package/compat/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +199 -199
  190. package/compat/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +273 -273
  191. package/compat/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +179 -179
  192. package/compat/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +165 -165
  193. package/compat/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +299 -299
  194. package/compat/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +32 -32
  195. package/compat/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +35 -35
  196. package/compat/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +135 -135
  197. package/compat/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +91 -91
  198. package/compat/VehicleSmallCard/VehicleSmallCard.styl +309 -309
  199. package/compat/VehicleSmallCard/VehicleSmallCard.tsx +448 -448
  200. package/compat/index.ts +77 -77
  201. package/compat/legacy-theme/mixins.styl +93 -93
  202. package/compat/legacy-theme/priceReviewColors.styl +12 -12
  203. package/compat/legacy-theme/slider.global.styl +5 -5
  204. package/compat/legacy-theme/theme.styl +136 -136
  205. package/compat/withLabel/withLabel.styl +33 -33
  206. package/compat/withLabel/withLabel.tsx +44 -44
  207. package/compat/withStats/withStats.styl +174 -174
  208. package/compat/withStats/withStats.tsx +238 -238
  209. package/constants/RateSearchWidget.ts +15 -15
  210. package/constants/Search.ts +290 -290
  211. package/constants/SearchWidget.ts +108 -108
  212. package/constants/app.ts +223 -223
  213. package/constants/common.ts +127 -127
  214. package/constants/core.ts +131 -131
  215. package/constants/highlights.ts +165 -165
  216. package/constants/price.ts +9 -9
  217. package/constants/selectors.ts +38 -38
  218. package/constants.ts +91 -91
  219. package/data/DataTransformers.ts +88 -88
  220. package/data/fieldMapping.ts +364 -342
  221. package/data/toAutobahnCar.ts +455 -442
  222. package/iconsvg/IconSVG.tsx +30 -30
  223. package/iconsvg/IconSVGConfig.tsx +768 -768
  224. package/iconsvg/SVG/AboPartner.tsx +16 -16
  225. package/iconsvg/SVG/ArrowQuotes.tsx +22 -22
  226. package/iconsvg/SVG/CloseIcon.tsx +17 -17
  227. package/iconsvg/SVG/CloseIconSelect.tsx +18 -18
  228. package/iconsvg/SVG/ClosedLockIcon.tsx +18 -18
  229. package/iconsvg/SVG/DealerCheckIcon.tsx +18 -18
  230. package/iconsvg/SVG/DealerPopoverMail.tsx +21 -21
  231. package/iconsvg/SVG/DealerPopoverPhone.tsx +21 -21
  232. package/iconsvg/SVG/GrayPhoneIcon.tsx +22 -22
  233. package/iconsvg/SVG/InternetIcon.tsx +18 -18
  234. package/iconsvg/SVG/WhiteEnvelopeIcon.tsx +21 -21
  235. package/iconsvg/SVG/bodyType/Cabrio.tsx +23 -23
  236. package/iconsvg/SVG/bodyType/Coupe.tsx +22 -22
  237. package/iconsvg/SVG/bodyType/Minibus.tsx +22 -22
  238. package/iconsvg/SVG/bodyType/Other.tsx +25 -25
  239. package/iconsvg/SVG/bodyType/Sedan.tsx +22 -22
  240. package/iconsvg/SVG/bodyType/SelectorCategoryCombi.tsx +68 -68
  241. package/iconsvg/SVG/bodyType/SelectorCategoryCompact.tsx +20 -20
  242. package/iconsvg/SVG/bodyType/SelectorCategoryConvertible.tsx +68 -68
  243. package/iconsvg/SVG/bodyType/SelectorCategoryCoupe.tsx +60 -60
  244. package/iconsvg/SVG/bodyType/SelectorCategoryMinibus.tsx +64 -64
  245. package/iconsvg/SVG/bodyType/SelectorCategoryOther.tsx +60 -60
  246. package/iconsvg/SVG/bodyType/SelectorCategorySedan.tsx +69 -69
  247. package/iconsvg/SVG/bodyType/SelectorCategorySuv.tsx +77 -77
  248. package/iconsvg/SVG/bodyType/SelectorCategoryTransporter.tsx +68 -68
  249. package/iconsvg/SVG/bodyType/SelectorCategoryVan.tsx +72 -72
  250. package/iconsvg/SVG/bodyType/Small.tsx +23 -23
  251. package/iconsvg/SVG/bodyType/Suv.tsx +23 -23
  252. package/iconsvg/SVG/bodyType/Van.tsx +23 -23
  253. package/iconsvg/SVG/bodyType/Wagon.tsx +23 -23
  254. package/iconsvg/SVG/common/AddIcon.tsx +16 -16
  255. package/iconsvg/SVG/common/AddPlus.tsx +16 -16
  256. package/iconsvg/SVG/common/AddressDashboard.tsx +29 -29
  257. package/iconsvg/SVG/common/AddressIcon.tsx +20 -20
  258. package/iconsvg/SVG/common/ArrowDetailedAccordionBlue.tsx +26 -26
  259. package/iconsvg/SVG/common/ArrowDownBlue.tsx +21 -21
  260. package/iconsvg/SVG/common/ArrowSelect.tsx +23 -23
  261. package/iconsvg/SVG/common/ArrowStepDown.tsx +18 -18
  262. package/iconsvg/SVG/common/Autocheck.tsx +19 -19
  263. package/iconsvg/SVG/common/AutodeLogo.tsx +36 -36
  264. package/iconsvg/SVG/common/Avatar.tsx +17 -17
  265. package/iconsvg/SVG/common/BellGray.tsx +19 -19
  266. package/iconsvg/SVG/common/BigInfoTransparent.tsx +13 -13
  267. package/iconsvg/SVG/common/Browse.tsx +20 -20
  268. package/iconsvg/SVG/common/Calendar.tsx +24 -24
  269. package/iconsvg/SVG/common/CallbackDashboard.tsx +30 -30
  270. package/iconsvg/SVG/common/Camera.tsx +17 -17
  271. package/iconsvg/SVG/common/Car.tsx +16 -16
  272. package/iconsvg/SVG/common/CarBody.tsx +19 -19
  273. package/iconsvg/SVG/common/CarFront.tsx +43 -43
  274. package/iconsvg/SVG/common/CarInspectionCheck.tsx +21 -21
  275. package/iconsvg/SVG/common/CarInspectionScheme0.tsx +32 -32
  276. package/iconsvg/SVG/common/CarInspectionScheme1.tsx +53 -53
  277. package/iconsvg/SVG/common/CarInspectionScheme2.tsx +52 -52
  278. package/iconsvg/SVG/common/CarInspectionScheme3.tsx +32 -32
  279. package/iconsvg/SVG/common/CarInspectionScheme4.tsx +32 -32
  280. package/iconsvg/SVG/common/CarInspectionScheme5.tsx +32 -32
  281. package/iconsvg/SVG/common/CarInspectionScheme6.tsx +32 -32
  282. package/iconsvg/SVG/common/CarInspectionSchemeGeneral copy.tsx +24 -24
  283. package/iconsvg/SVG/common/CarInspectionSchemeGeneral.tsx +24 -24
  284. package/iconsvg/SVG/common/CheckBlue.tsx +18 -18
  285. package/iconsvg/SVG/common/CheckGreen.tsx +22 -22
  286. package/iconsvg/SVG/common/CheckMark.tsx +16 -16
  287. package/iconsvg/SVG/common/CheckWhite.tsx +19 -19
  288. package/iconsvg/SVG/common/Chevron.tsx +17 -17
  289. package/iconsvg/SVG/common/CircledCheckmark.tsx +25 -25
  290. package/iconsvg/SVG/common/Clock.tsx +18 -18
  291. package/iconsvg/SVG/common/Close.tsx +19 -19
  292. package/iconsvg/SVG/common/CloseGrey.tsx +22 -22
  293. package/iconsvg/SVG/common/ContactEmail.tsx +21 -21
  294. package/iconsvg/SVG/common/ContactPhone.tsx +28 -28
  295. package/iconsvg/SVG/common/CopyIcon copy.tsx +22 -22
  296. package/iconsvg/SVG/common/CopyIcon.tsx +22 -22
  297. package/iconsvg/SVG/common/CopyIconForDealer.tsx +21 -21
  298. package/iconsvg/SVG/common/DashboardIcon.tsx +20 -20
  299. package/iconsvg/SVG/common/DashboardQuestionMark.tsx +20 -20
  300. package/iconsvg/SVG/common/DealersIcon.tsx +20 -20
  301. package/iconsvg/SVG/common/DeleteCircle.tsx +31 -31
  302. package/iconsvg/SVG/common/DeleteV1Icon.tsx +18 -18
  303. package/iconsvg/SVG/common/DeliveryDashboard.tsx +25 -25
  304. package/iconsvg/SVG/common/DeliveryMail.tsx +24 -24
  305. package/iconsvg/SVG/common/Discount100De.tsx +18 -18
  306. package/iconsvg/SVG/common/Discount100En.tsx +19 -19
  307. package/iconsvg/SVG/common/Discount66De.tsx +28 -28
  308. package/iconsvg/SVG/common/Discount66En.tsx +20 -20
  309. package/iconsvg/SVG/common/DoneIcon.tsx +18 -18
  310. package/iconsvg/SVG/common/EditCircle.tsx +32 -32
  311. package/iconsvg/SVG/common/EditPriceIcon.tsx +20 -20
  312. package/iconsvg/SVG/common/EuroCurrency.tsx +18 -18
  313. package/iconsvg/SVG/common/Export.tsx +20 -20
  314. package/iconsvg/SVG/common/Eye.tsx +17 -17
  315. package/iconsvg/SVG/common/EyeCatch.tsx +19 -19
  316. package/iconsvg/SVG/common/FavoritesIcon.tsx +20 -20
  317. package/iconsvg/SVG/common/FilterRange.tsx +16 -16
  318. package/iconsvg/SVG/common/FilterToolBlack.tsx +23 -23
  319. package/iconsvg/SVG/common/FlagDe.tsx +21 -21
  320. package/iconsvg/SVG/common/FlagEn.tsx +43 -43
  321. package/iconsvg/SVG/common/GrayEnvelopeIcon.tsx +19 -19
  322. package/iconsvg/SVG/common/HamburgerMenuIcon.tsx +18 -18
  323. package/iconsvg/SVG/common/HandingOverDashboard.tsx +32 -32
  324. package/iconsvg/SVG/common/ImageSettingsIcon.tsx +20 -20
  325. package/iconsvg/SVG/common/Info.tsx +16 -16
  326. package/iconsvg/SVG/common/InfoIcon.tsx +17 -17
  327. package/iconsvg/SVG/common/InfoTransparent.tsx +18 -18
  328. package/iconsvg/SVG/common/LogoutIcon.tsx +20 -20
  329. package/iconsvg/SVG/common/MagnifyingGlass.tsx +31 -31
  330. package/iconsvg/SVG/common/MenuArrow.tsx +16 -16
  331. package/iconsvg/SVG/common/MenuGrey.tsx +22 -22
  332. package/iconsvg/SVG/common/MobileDeLogo.tsx +108 -108
  333. package/iconsvg/SVG/common/MyOrderIcon.tsx +20 -20
  334. package/iconsvg/SVG/common/MyVehiclesIcon.tsx +20 -20
  335. package/iconsvg/SVG/common/NewFlagDe.tsx +25 -25
  336. package/iconsvg/SVG/common/NewFlagEn.tsx +34 -34
  337. package/iconsvg/SVG/common/OrderReceivedDashboard.tsx +27 -27
  338. package/iconsvg/SVG/common/Package.tsx +30 -30
  339. package/iconsvg/SVG/common/Phone.tsx +18 -18
  340. package/iconsvg/SVG/common/PhoneGrey.tsx +22 -22
  341. package/iconsvg/SVG/common/PickupDashboard.tsx +30 -30
  342. package/iconsvg/SVG/common/Picture.tsx +24 -24
  343. package/iconsvg/SVG/common/Pictures.tsx +32 -32
  344. package/iconsvg/SVG/common/Plus.tsx +16 -16
  345. package/iconsvg/SVG/common/PlusNew.tsx +16 -16
  346. package/iconsvg/SVG/common/PreparationDashboard.tsx +29 -29
  347. package/iconsvg/SVG/common/ProfileDashboard.tsx +24 -24
  348. package/iconsvg/SVG/common/ProfileIcon.tsx +17 -17
  349. package/iconsvg/SVG/common/Question.tsx +19 -19
  350. package/iconsvg/SVG/common/QuestionBold.tsx +25 -25
  351. package/iconsvg/SVG/common/RegistrationDashboard.tsx +31 -31
  352. package/iconsvg/SVG/common/SavedSearchsIcon.tsx +20 -20
  353. package/iconsvg/SVG/common/Search.tsx +19 -19
  354. package/iconsvg/SVG/common/SearchGrey.tsx +22 -22
  355. package/iconsvg/SVG/common/SettingPenIcon.tsx +20 -20
  356. package/iconsvg/SVG/common/Share.tsx +16 -16
  357. package/iconsvg/SVG/common/ShoppingCart.tsx +18 -18
  358. package/iconsvg/SVG/common/SliderArrow.tsx +21 -21
  359. package/iconsvg/SVG/common/SliderEye.tsx +17 -17
  360. package/iconsvg/SVG/common/SortUpDownArrows.tsx +18 -18
  361. package/iconsvg/SVG/common/Speedometer.tsx +23 -23
  362. package/iconsvg/SVG/common/Star.tsx +20 -20
  363. package/iconsvg/SVG/common/StarNew.tsx +16 -16
  364. package/iconsvg/SVG/common/StarOutline.tsx +20 -20
  365. package/iconsvg/SVG/common/StarRoundedCorners.tsx +18 -18
  366. package/iconsvg/SVG/common/Stats.tsx +17 -17
  367. package/iconsvg/SVG/common/Step1.tsx +21 -21
  368. package/iconsvg/SVG/common/Step2.tsx +20 -20
  369. package/iconsvg/SVG/common/Step3.tsx +21 -21
  370. package/iconsvg/SVG/common/SupportCallbackIcon.tsx +20 -20
  371. package/iconsvg/SVG/common/Telephone.tsx +22 -22
  372. package/iconsvg/SVG/common/Time.tsx +17 -17
  373. package/iconsvg/SVG/common/Timetable.tsx +18 -18
  374. package/iconsvg/SVG/common/Trash.tsx +22 -22
  375. package/iconsvg/SVG/common/TrashRed.tsx +23 -23
  376. package/iconsvg/SVG/common/Upload.tsx +17 -17
  377. package/iconsvg/SVG/common/UserGrey.tsx +22 -22
  378. package/iconsvg/SVG/common/UserProfileIcon.tsx +20 -20
  379. package/iconsvg/SVG/common/ValidateFailure.tsx +21 -21
  380. package/iconsvg/SVG/common/ValidateSuccess.tsx +21 -21
  381. package/iconsvg/SVG/common/WarningTriangle.tsx +20 -20
  382. package/iconsvg/SVG/common/WhiteArrowUp.tsx +21 -21
  383. package/iconsvg/SVG/common/WhiteKey.tsx +21 -21
  384. package/iconsvg/SVG/common/WhitePeople.tsx +23 -23
  385. package/iconsvg/SVG/common/WhiteTick.tsx +19 -19
  386. package/iconsvg/SVG/flags/AT.tsx +19 -19
  387. package/iconsvg/SVG/flags/BE.tsx +20 -20
  388. package/iconsvg/SVG/flags/BG.tsx +20 -20
  389. package/iconsvg/SVG/flags/CH.tsx +22 -22
  390. package/iconsvg/SVG/flags/CZ.tsx +18 -18
  391. package/iconsvg/SVG/flags/DE.tsx +18 -18
  392. package/iconsvg/SVG/flags/DK.tsx +18 -18
  393. package/iconsvg/SVG/flags/ES.tsx +2585 -2585
  394. package/iconsvg/SVG/flags/FI.tsx +18 -18
  395. package/iconsvg/SVG/flags/FR.tsx +20 -20
  396. package/iconsvg/SVG/flags/GB.tsx +26 -26
  397. package/iconsvg/SVG/flags/HR.tsx +135 -135
  398. package/iconsvg/SVG/flags/HU.tsx +20 -20
  399. package/iconsvg/SVG/flags/IT.tsx +20 -20
  400. package/iconsvg/SVG/flags/LI.tsx +106 -106
  401. package/iconsvg/SVG/flags/LU.tsx +18 -18
  402. package/iconsvg/SVG/flags/NL.tsx +18 -18
  403. package/iconsvg/SVG/flags/NO.tsx +20 -20
  404. package/iconsvg/SVG/flags/PL.tsx +19 -19
  405. package/iconsvg/SVG/flags/RO.tsx +20 -20
  406. package/iconsvg/SVG/flags/RU.tsx +20 -20
  407. package/iconsvg/SVG/flags/SE.tsx +20 -20
  408. package/iconsvg/SVG/flags/SI.tsx +54 -54
  409. package/iconsvg/SVG/flags/SK.tsx +34 -34
  410. package/iconsvg/SVG/flags/UA.tsx +19 -19
  411. package/iconsvg/SVG/infoBlocks/14DaysReturnPolicy.tsx +18 -18
  412. package/iconsvg/SVG/infoBlocks/AlertInfo.tsx +19 -19
  413. package/iconsvg/SVG/infoBlocks/Autocheck.tsx +19 -19
  414. package/iconsvg/SVG/infoBlocks/CheckTheStory.tsx +22 -22
  415. package/iconsvg/SVG/infoBlocks/CustomerServiceWhite.tsx +16 -16
  416. package/iconsvg/SVG/infoBlocks/Guarantee.tsx +16 -16
  417. package/iconsvg/SVG/infoBlocks/OrderWhite.tsx +13 -13
  418. package/iconsvg/SVG/infoBlocks/PriceGuarantee.tsx +19 -19
  419. package/iconsvg/SVG/infoBlocks/PriceGuaranteeWhite.tsx +17 -17
  420. package/iconsvg/SVG/infoBlocks/TransportAndDelivery.tsx +21 -21
  421. package/iconsvg/SVG/infoBlocks/Warranty.tsx +23 -23
  422. package/iconsvg/SVG/popower/Mail.tsx +18 -18
  423. package/iconsvg/SVG/popower/Phone.tsx +19 -19
  424. package/iconsvg/SVG/popower/Schedule.tsx +18 -18
  425. package/iconsvg/SVG/searchWidgets/drive/AAllWheelDrive.tsx +26 -26
  426. package/iconsvg/SVG/searchWidgets/drive/AllWheelDrive.tsx +26 -26
  427. package/iconsvg/SVG/searchWidgets/drive/FrontWheelDrive.tsx +25 -25
  428. package/iconsvg/SVG/searchWidgets/drive/OtherWheelDrive.tsx +26 -26
  429. package/iconsvg/SVG/searchWidgets/drive/RearWheelDrive.tsx +25 -25
  430. package/iconsvg/SVG/searchWidgets/fuel/FuelDiesel.tsx +18 -18
  431. package/iconsvg/SVG/searchWidgets/fuel/FuelElectrical.tsx +19 -19
  432. package/iconsvg/SVG/searchWidgets/fuel/FuelElectricalDiesel.tsx +34 -34
  433. package/iconsvg/SVG/searchWidgets/fuel/FuelElectricalPetrol.tsx +20 -20
  434. package/iconsvg/SVG/searchWidgets/fuel/FuelEthanol.tsx +53 -53
  435. package/iconsvg/SVG/searchWidgets/fuel/FuelHydrogen.tsx +24 -24
  436. package/iconsvg/SVG/searchWidgets/fuel/FuelLpg.tsx +24 -24
  437. package/iconsvg/SVG/searchWidgets/fuel/FuelNaturalGas.tsx +23 -23
  438. package/iconsvg/SVG/searchWidgets/fuel/FuelOther.tsx +28 -28
  439. package/iconsvg/SVG/searchWidgets/fuel/FuelPetrol.tsx +18 -18
  440. package/iconsvg/SVG/settings/Account.tsx +17 -17
  441. package/iconsvg/SVG/settings/DataUsage.tsx +17 -17
  442. package/iconsvg/SVG/settings/MarketResearch.tsx +17 -17
  443. package/iconsvg/SVG/settings/Newsletter.tsx +17 -17
  444. package/iconsvg/SVG/settings/RemoveEye.tsx +17 -17
  445. package/iconsvg/SVG/settings/RemoveEyeOff.tsx +17 -17
  446. package/iconsvg/SVG/settings/Security.tsx +17 -17
  447. package/iconsvg/SVG/settings/Warning.tsx +17 -17
  448. package/iconsvg/SVG/slider/360.tsx +23 -23
  449. package/iconsvg/SVG/slider/360New.tsx +20 -20
  450. package/iconsvg/SVG/slider/Checked.tsx +19 -19
  451. package/iconsvg/SVG/slider/DiscountRibbon.tsx +51 -51
  452. package/iconsvg/SVG/slider/DiscountRibbonMobile.tsx +47 -47
  453. package/iconsvg/SVG/slider/DiscountRibbonNew.tsx +29 -29
  454. package/iconsvg/SVG/slider/Easy.tsx +19 -19
  455. package/iconsvg/SVG/slider/Fullscreen.tsx +16 -16
  456. package/iconsvg/SVG/slider/FullscreenWindow.tsx +23 -23
  457. package/iconsvg/SVG/slider/Safe.tsx +19 -19
  458. package/iconsvg/SVG/slider/ToBuy.tsx +19 -19
  459. package/iconsvg/SVG/slider/YoutubeButton.tsx +26 -26
  460. package/iconsvg/SVG/slider/ZoomIn.tsx +21 -21
  461. package/iconsvg/SVG/slider/ZoomOut.tsx +21 -21
  462. package/iconsvg/SVG/social/AndroidLogo.tsx +18 -18
  463. package/iconsvg/SVG/social/Apple.tsx +19 -19
  464. package/iconsvg/SVG/social/FacebookF.tsx +19 -19
  465. package/iconsvg/SVG/social/GooglePlusG.tsx +19 -19
  466. package/iconsvg/SVG/social/Instagram.tsx +17 -17
  467. package/iconsvg/SVG/social/Pinterest.tsx +19 -19
  468. package/iconsvg/SVG/social/SharingInterface.tsx +21 -21
  469. package/iconsvg/SVG/social/Twitter.tsx +19 -19
  470. package/iconsvg/SVG/social/Youtube.tsx +19 -19
  471. package/iconsvg/SVG/vehicle/AboIcon.tsx +11 -11
  472. package/iconsvg/SVG/vehicle/Abs.tsx +24 -24
  473. package/iconsvg/SVG/vehicle/AirCond.tsx +34 -34
  474. package/iconsvg/SVG/vehicle/Airbag.tsx +21 -21
  475. package/iconsvg/SVG/vehicle/AuxiliaryHeating.tsx +23 -23
  476. package/iconsvg/SVG/vehicle/Bluetooth.tsx +22 -22
  477. package/iconsvg/SVG/vehicle/BuyIcon.tsx +15 -15
  478. package/iconsvg/SVG/vehicle/CarAvailability.tsx +22 -22
  479. package/iconsvg/SVG/vehicle/CarInspectionCheck.tsx +21 -21
  480. package/iconsvg/SVG/vehicle/CarInspectionCross.tsx +21 -21
  481. package/iconsvg/SVG/vehicle/CheckoutChecked.tsx +15 -15
  482. package/iconsvg/SVG/vehicle/Co2.tsx +24 -24
  483. package/iconsvg/SVG/vehicle/CruiseControl.tsx +25 -25
  484. package/iconsvg/SVG/vehicle/Date.tsx +21 -21
  485. package/iconsvg/SVG/vehicle/Delivery.tsx +12 -12
  486. package/iconsvg/SVG/vehicle/Diesel.tsx +28 -28
  487. package/iconsvg/SVG/vehicle/Display.tsx +25 -25
  488. package/iconsvg/SVG/vehicle/Done.tsx +11 -11
  489. package/iconsvg/SVG/vehicle/Door.tsx +19 -19
  490. package/iconsvg/SVG/vehicle/DoubleDone.tsx +18 -18
  491. package/iconsvg/SVG/vehicle/EditIcon.tsx +11 -11
  492. package/iconsvg/SVG/vehicle/EmergencyBrakeAssistant.tsx +27 -27
  493. package/iconsvg/SVG/vehicle/Eps.tsx +24 -24
  494. package/iconsvg/SVG/vehicle/Esp.tsx +24 -24
  495. package/iconsvg/SVG/vehicle/FinancingIcon.tsx +20 -20
  496. package/iconsvg/SVG/vehicle/FuelConsumption.tsx +20 -20
  497. package/iconsvg/SVG/vehicle/Fueling.tsx +22 -22
  498. package/iconsvg/SVG/vehicle/FullDrive.tsx +24 -24
  499. package/iconsvg/SVG/vehicle/GasElectric.tsx +28 -28
  500. package/iconsvg/SVG/vehicle/HandsFreePhoneSystem.tsx +24 -24
  501. package/iconsvg/SVG/vehicle/Kw.tsx +23 -23
  502. package/iconsvg/SVG/vehicle/LastCrawledAt.tsx +22 -22
  503. package/iconsvg/SVG/vehicle/LeasingIcon.tsx +14 -14
  504. package/iconsvg/SVG/vehicle/Led.tsx +24 -24
  505. package/iconsvg/SVG/vehicle/LightSensor.tsx +22 -22
  506. package/iconsvg/SVG/vehicle/LinkAlternative.tsx +15 -15
  507. package/iconsvg/SVG/vehicle/Location.tsx +17 -17
  508. package/iconsvg/SVG/vehicle/MinusIcon.tsx +11 -11
  509. package/iconsvg/SVG/vehicle/Mirror.tsx +19 -19
  510. package/iconsvg/SVG/vehicle/Navigation.tsx +27 -27
  511. package/iconsvg/SVG/vehicle/NewCar.tsx +21 -21
  512. package/iconsvg/SVG/vehicle/NoImage.tsx +17 -17
  513. package/iconsvg/SVG/vehicle/Owner.tsx +18 -18
  514. package/iconsvg/SVG/vehicle/PanoramicRoof.tsx +23 -23
  515. package/iconsvg/SVG/vehicle/ParkingAssistants.tsx +24 -24
  516. package/iconsvg/SVG/vehicle/PickYourself.tsx +18 -18
  517. package/iconsvg/SVG/vehicle/PlusIcon.tsx +11 -11
  518. package/iconsvg/SVG/vehicle/Power.tsx +21 -21
  519. package/iconsvg/SVG/vehicle/Ps.tsx +19 -19
  520. package/iconsvg/SVG/vehicle/Question.tsx +24 -24
  521. package/iconsvg/SVG/vehicle/Seats.tsx +21 -21
  522. package/iconsvg/SVG/vehicle/SeatsHeating.tsx +26 -26
  523. package/iconsvg/SVG/vehicle/SelectorGearboxAutomatic.tsx +24 -24
  524. package/iconsvg/SVG/vehicle/SelectorGearboxManualShift.tsx +19 -19
  525. package/iconsvg/SVG/vehicle/SelectorGearboxOther.tsx +24 -24
  526. package/iconsvg/SVG/vehicle/SelectorGearboxSemiAutomatic.tsx +30 -30
  527. package/iconsvg/SVG/vehicle/SelectorInteriorTypeAlcantara.tsx +225 -225
  528. package/iconsvg/SVG/vehicle/SelectorInteriorTypeFabric.tsx +29 -29
  529. package/iconsvg/SVG/vehicle/SelectorInteriorTypeFullLeather.tsx +29 -29
  530. package/iconsvg/SVG/vehicle/SelectorInteriorTypeOther.tsx +26 -26
  531. package/iconsvg/SVG/vehicle/SelectorInteriorTypePartLeather.tsx +142 -142
  532. package/iconsvg/SVG/vehicle/SelectorInteriorTypeSyntheticLeather.tsx +27 -27
  533. package/iconsvg/SVG/vehicle/SelectorInteriorTypeVelours.tsx +39 -39
  534. package/iconsvg/SVG/vehicle/Shield.tsx +39 -39
  535. package/iconsvg/SVG/vehicle/Speedometer.tsx +17 -17
  536. package/iconsvg/SVG/vehicle/StartStopSystem.tsx +30 -30
  537. package/iconsvg/SVG/vehicle/Stop.tsx +25 -25
  538. package/iconsvg/SVG/vehicle/TickMark.tsx +21 -21
  539. package/iconsvg/SVG/vehicle/TrafficSignRecognition.tsx +29 -29
  540. package/iconsvg/SVG/vehicle/TrailerCoupling.tsx +24 -24
  541. package/iconsvg/SVG/vehicle/Transmission.tsx +27 -27
  542. package/iconsvg/SVG/vehicle/Wheel.tsx +43 -43
  543. package/iconsvg/SVG/vehicle/Wipers.tsx +22 -22
  544. package/iconsvg/SVG/vehicle/Wrench.tsx +17 -17
  545. package/iconsvg/index.ts +7 -7
  546. package/index.ts +18 -18
  547. package/locales/de/autobahn.json +676 -671
  548. package/locales/en/autobahn.json +676 -671
  549. package/locales/legacy/SearchDetailedPage.ts +205 -205
  550. package/locales/legacy/cbd.ts +719 -719
  551. package/locales/legacy/common.ts +109 -109
  552. package/locales/legacy/data.ts +1118 -1118
  553. package/locales/legacy/priceRating.ts +10 -10
  554. package/locales/legacy/sortingOptions.ts +21 -21
  555. package/media/images/raiting-stars-min.svg +7 -7
  556. package/media/images/refresh-button.svg +49 -49
  557. package/media/images/user-icon.svg +16 -16
  558. package/media/svg/infoBlocks/whyAutodeIconSet-F.svg +9 -9
  559. package/media/svg/infoBlocks/whyAutodeIconSet-G.svg +8 -8
  560. package/media/svg/infoBlocks/whyAutodeIconSet-Q.svg +6 -6
  561. package/media/svg/infoBlocks/whyAutodeIconSet-R.svg +9 -9
  562. package/media/svg/usp/icon1.svg +16 -16
  563. package/media/svg/usp/icon2.svg +13 -13
  564. package/media/svg/usp/icon3.svg +10 -10
  565. package/media/svg/usp/icon4.svg +14 -14
  566. package/package.json +30 -30
  567. package/schemes/AggregationScheme.ts +73 -73
  568. package/searchFilters/filterOptions.ts +119 -119
  569. package/searchFilters/filterProps.ts +35 -35
  570. package/searchFilters/index.ts +15 -15
  571. package/theme/autobahn.css +25 -25
  572. package/theme/colors_and_type.css +113 -113
  573. package/theme/md3.css +2045 -2034
  574. package/types/types.ts +373 -373
  575. package/types.ts +8 -8
  576. package/ui/Accordion.tsx +134 -134
  577. package/ui/Button.tsx +62 -62
  578. package/ui/CardCarousel.tsx +133 -133
  579. package/ui/Chip.tsx +29 -29
  580. package/ui/DatePicker.tsx +145 -145
  581. package/ui/Dropdown.tsx +205 -205
  582. package/ui/FileUpload.tsx +154 -154
  583. package/ui/FormCheckbox.tsx +79 -79
  584. package/ui/FormDropdown.tsx +327 -327
  585. package/ui/FormField.tsx +88 -88
  586. package/ui/FormRadio.tsx +93 -93
  587. package/ui/FormRadioGroup.tsx +106 -106
  588. package/ui/Icon.tsx +391 -391
  589. package/ui/IconButton.tsx +44 -44
  590. package/ui/Modal.tsx +187 -187
  591. package/ui/Pagination.tsx +140 -140
  592. package/ui/Price.tsx +25 -25
  593. package/ui/PriceEvalBar.tsx +48 -48
  594. package/ui/SaveChip.tsx +34 -34
  595. package/ui/Segmented.tsx +48 -48
  596. package/ui/Skeleton.tsx +75 -75
  597. package/ui/Spec.tsx +24 -24
  598. package/ui/Stars.tsx +29 -29
  599. package/ui/StatChip.tsx +21 -21
  600. package/ui/Stepper.tsx +106 -106
  601. package/ui/Switch.tsx +65 -65
  602. package/ui/Table.tsx +156 -156
  603. package/ui/Textarea.tsx +58 -58
  604. package/ui/index.ts +88 -88
  605. package/utils/CommonUtils.ts +648 -648
  606. package/utils/DateUtils.ts +101 -101
  607. package/utils/index.ts +74 -74
  608. package/utils/power.ts +11 -11
  609. package/utils/query.ts +21 -21
  610. package/vdp/FinanceCalculator.tsx +465 -465
  611. package/vdp/VdpModules.tsx +1490 -1490
  612. package/vdp/VdpViewer.tsx +209 -209
  613. package/vdp/index.ts +75 -75
  614. package/vdp/types.ts +197 -197
  615. package/vehiclesProps/cbdSelectors.ts +117 -117
  616. package/vehiclesProps/decoratedLightProps.tsx +572 -572
  617. package/vehiclesProps/decoratedProps.tsx +1746 -1746
  618. package/vehiclesProps/equipment.ts +129 -129
  619. package/vehiclesProps/vehicleDetails.ts +428 -428
  620. package/widgets/SearchBox.tsx +256 -256
  621. package/widgets/index.ts +5 -5
@@ -1,1746 +1,1746 @@
1
- import * as React from 'react';
2
- import moment from 'moment';
3
-
4
- import Icon from '../compat/IconContainer/IconContainer';
5
- import CO2Efficiency from '../compat/Co2Widget/CO2Efficiency';
6
- import { formatTimestamp } from '../utils/DateUtils';
7
- import { formatMileage } from '../utils/CommonUtils';
8
- import { EMISSION_STICKERS_ICONS, WP_EMISSION_STICKERS_ICONS } from '../constants/Search';
9
- import { DELIVERY_PERIODS_EXTRA } from '../constants';
10
- import { IDecoratedProp, ICar, IFinancingUtils } from '../types/types';
11
- import { getFormattedPrice } from '../utils/CommonUtils';
12
-
13
- const formatDeliveryPeriod = (t: (key: string, options?: object) => string, deliveryPeriod: string) => {
14
- const count: number = +DELIVERY_PERIODS_EXTRA.find((period: any) => period.value === deliveryPeriod).label;
15
- // months until delivery date unrounded (float)
16
- const monthsTo: number = moment.utc().diff(moment.utc().subtract(count, 'd'), 'M', true);
17
- return Math.round(monthsTo) > 1
18
- ? t('vehicleProps:value.deliveryPeriodMonths', { count: Math.round(monthsTo) })
19
- : t('vehicleProps:value.deliveryPeriodDays', { count });
20
- };
21
-
22
- const isPropDefined = (prop: any) => {
23
- const type = typeof prop;
24
- if (type === 'string') {
25
- return prop.indexOf('other') === -1
26
- && prop.indexOf('unknown') === -1;
27
- }
28
- return !(prop === undefined || prop === null) && type !== 'undefined';
29
- };
30
-
31
- const isCheckedBatteryTime = (prop: any, t: (key: string, options?: object) => string) => {
32
- switch (prop) {
33
- case 'selector_batteryCharchingDurationMinutes':
34
- return 'min';
35
- break;
36
- case 'selector_batteryCharchingDurationHours':
37
- return 'h';
38
- break;
39
- default:
40
- return t('vehicleProps:value.na');
41
- }
42
- };
43
-
44
- // getPowerLabel MOVED to @bytebrand/fe-ui-core-autobahn (pure logic, shared by
45
- // fe-main/fe-landing/fe-wp-widgets). Re-exported here so this module's public
46
- // symbol set — and the `@bytebrand/fe-ui-core/utils` barrel — stay unchanged.
47
- export { getPowerLabel } from '../utils/power';
48
- const wrapValue = (value:string): React.ReactNode => {
49
- const regex = /-?\d+(\,\d+)?/; // match any digit
50
- const matches = value.match(regex); // get an array of all digits found
51
-
52
- if (matches && matches.length > 0) { // If at least one number is found in the input string
53
- const index = value.indexOf(matches[0]) + matches[0].length;
54
- const beforeText = value.slice(0, index);
55
- const afterText = value.slice(index);
56
-
57
- return (
58
- <>
59
- {beforeText}
60
- <span className='smallText'>{afterText}</span>
61
- </>
62
- ); // Return a JSX element with a span wrapper around the text after the number
63
- }
64
- return <>{value}</>; // If no numbers are found in the input string, return the original string without any modification
65
- };
66
-
67
- const getDecoratedProps = (
68
- car: ICar, // @TODO should have a proper interface
69
- t: (key: string, options?: object) => string,
70
- language: string = 'en',
71
- simplifiedLabels: boolean = false, // shortened labels for repsonsive layout (see 'power'),
72
- financingUtils?: IFinancingUtils
73
- ): IDecoratedProp => {
74
- const {
75
- offer = {},
76
- // countryName,
77
- mainData: {
78
- firstRegistration = '',
79
- mileage = '',
80
- numberOfPreviousOwners = '',
81
- doors = '',
82
- usageType = '',
83
- countryVersion = '',
84
- condition = '',
85
- damaged = '',
86
- category = '',
87
- seats = '',
88
- nonSmokerVehicle = '',
89
- make = '',
90
- model = ''
91
- } = {}
92
- } = car;
93
- const props: any = {
94
- makeModel: {
95
- title: t('vehicleProps:title.makeModel'),
96
- get value() { return `${make} ${model}`; }
97
- },
98
- mileage: {
99
- title: t('vehicleProps:title.mileage'),
100
- icon: 'speed',
101
- get value() {
102
- return Number.isFinite(parseInt(mileage, 10))
103
- ? t('vehicleProps:value.mileage', { mileage: formatMileage(mileage) })
104
- : t('vehicleProps:value.na');
105
- }
106
- },
107
-
108
- firstRegistration: {
109
- title: t('vehicleProps:title.firstRegistration'),
110
- icon: 'date',
111
- get value() {
112
- return Number.isFinite(firstRegistration)
113
- ? formatTimestamp({ timestamp: firstRegistration, format: 'MM/YYYY' })
114
- : t('vehicleProps:value.na');
115
- }
116
- },
117
-
118
- numberOfPreviousOwners: {
119
- title: t('vehicleProps:title.numberOfPreviousOwners'),
120
- icon: 'owner',
121
- get value() {
122
- return Number.isFinite(numberOfPreviousOwners)
123
- ? t('vehicleProps:value.vehicleOwners', { count: numberOfPreviousOwners })
124
- : t('vehicleProps:value.na');
125
- }
126
- },
127
-
128
- doorsOnly: {
129
- icon: 'door',
130
- get value() {
131
- if (doors > 0) {
132
- return t('vehicleProps:value.doorsOnly', { doors });
133
- }
134
-
135
- return t('vehicleProps:value.na');
136
- }
137
- },
138
-
139
- usageType: {
140
- icon: 'new',
141
- get value() {
142
- if (condition === 'selector_condition_new') return t('vehicleProps:value.newCar');
143
- return isPropDefined(usageType) ? t(`cbd:${usageType}`) : t('cbd:selector_condition_used');
144
- }
145
- },
146
-
147
- gearbox: {
148
- get icon() {
149
- const gearbox = car.driveSuspension.gearbox;
150
- return isPropDefined(gearbox) ? car.driveSuspension.gearbox : 'selector_gearbox_manualShift';
151
- },
152
- get value() {
153
- const gearbox = car.driveSuspension.gearbox;
154
- return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
155
- }
156
- },
157
-
158
- power: {
159
- title: t('vehicleProps:title.power'),
160
- icon: 'ps',
161
- get value() {
162
- const { powerKW, powerPS } = car.engineData;
163
-
164
- if (Number.isFinite(powerKW) && Number.isFinite(powerPS)) {
165
- return simplifiedLabels
166
- ? t('vehicleProps:value.powerPS', { powerPS })
167
- : t('vehicleProps:value.power', { powerKW, powerPS });
168
- }
169
-
170
- return t('vehicleProps:value.na');
171
- }
172
- },
173
-
174
- powerAlternateView: {
175
- title: t('vehicleProps:title.power'),
176
- icon: 'kw',
177
- get value() {
178
- const { powerKW, powerPS } = car.engineData;
179
- return Number.isFinite(powerKW) && Number.isFinite(powerPS)
180
- ? t('vehicleProps:value.powerAlternateView', { powerKW, powerPS })
181
- : t('vehicleProps:value.na');
182
- }
183
- },
184
-
185
- fuel: {
186
- title: t('vehicleProps:title.fuel'),
187
- get icon() { return car.consumption.fuel; },
188
- get value() {
189
- const fuel = car.consumption.fuel;
190
- return isPropDefined(fuel) ? t(`cbd:${fuel}`) : t('vehicleProps:value.na');
191
- }
192
- },
193
-
194
- accidentDamaged: {
195
- title: t('cbd:mainData_accidentDamaged'),
196
- icon: 'wrench',
197
- get value() {
198
- return damaged ? t('vehicleProps:value.damaged') : t('vehicleProps:value.accidentFree');
199
- }
200
- },
201
-
202
- co2: {
203
- icon: 'co2',
204
- get value() {
205
- const co2 = car.environmentEmissions.co2;
206
- return Number.isFinite(co2)
207
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
208
- : t('vehicleProps:value.na');
209
- }
210
- },
211
-
212
- cylinders: {
213
- title: t('vehicleProps:title.cylinders'),
214
- get value() {
215
- const { engineLocation } = car.engineData;
216
- const cylinders = parseInt(car.engineData.cylinders, 10);
217
- return Number.isFinite(cylinders)
218
- ? (engineLocation ? `${cylinders} / ${t(`cbd:${engineLocation}`)}` : cylinders)
219
- : t('vehicleProps:value.na');
220
- }
221
- },
222
-
223
- plugIn: {
224
- title: 'Plug-In',
225
- get value() {
226
- const { hybridPlugin } = car.engineData;
227
- return hybridPlugin ? t(`cbd:selector_hybridPlugin_yes`) : t('cbd:selector_hybridPlugin_no');
228
- }
229
- },
230
-
231
- cubicCapacity: {
232
- title: t('vehicleProps:title.cubicCapacity'),
233
- get value() {
234
- const cubicCapacity = car.engineData.cubicCapacity;
235
- return Number.isFinite(cubicCapacity)
236
- ? t('vehicleProps:value.cubicCapacity', { cubicCapacity: cubicCapacity.toLocaleString(language) })
237
- : t('vehicleProps:value.na');
238
- }
239
- },
240
-
241
- torque: {
242
- title: t('vehicleProps:title.torque'),
243
- get value() {
244
- const torque = car.engineData.torque;
245
- return torque
246
- ? t('vehicleProps:value.torque', { torque })
247
- : t('vehicleProps:value.na');
248
- }
249
- },
250
-
251
- acceleration: {
252
- title: t('vehicleProps:title.acceleration'),
253
- get value() {
254
- const acceleration = car.engineData.acceleration100;
255
- return isPropDefined(acceleration)
256
- ? (t('vehicleProps:value.acceleration', { seconds: acceleration }))
257
- : t('vehicleProps:value.na');
258
- }
259
- },
260
-
261
- topSpeed: {
262
- title: t('vehicleProps:title.topSpeed'),
263
- get value() {
264
- const topSpeed = car.engineData.highSpeed;
265
- return isPropDefined(topSpeed)
266
- ? (t('vehicleProps:value.topSpeed', { mileage: topSpeed }))
267
- : t('vehicleProps:value.na');
268
- }
269
- },
270
-
271
- transmission: {
272
- title: t('vehicleProps:title.transmission'),
273
- get value() {
274
- const gearbox = car.driveSuspension.gearbox;
275
- return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
276
- }
277
- },
278
-
279
- driveType: {
280
- title: t('vehicleProps:title.driveType'),
281
- get icon() {
282
- const driveType = car.driveSuspension.driveType;
283
- return isPropDefined(driveType) ? car.driveSuspension.driveType : 'selector_driveType_frontWheelDrive';
284
- },
285
- get value() {
286
- const driveType = car.driveSuspension.driveType;
287
- return isPropDefined(driveType) ? t(`cbd:${driveType}`) : t('vehicleProps:value.na');
288
- }
289
- },
290
-
291
- fuelCapacity: {
292
- title: t('vehicleProps:title.fuelCapacity'),
293
- get value() {
294
- const fuelCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.fuelCapacity;
295
- return Number.isFinite(fuelCapacity)
296
- ? t('vehicleProps:value.fuelCapacity', { capacity: fuelCapacity.toLocaleString(language) })
297
- : t('vehicleProps:value.na');
298
- }
299
- },
300
-
301
- batteryCapacity: {
302
- title: t('vehicleProps:title.batteryCapacityTitle'),
303
- get value() {
304
- const batteryCapacity = car.battery && car.battery.batteryCapacity;
305
- return batteryCapacity && Number.isFinite(batteryCapacity)
306
- ? t('vehicleProps:value.batteryCapacity', { batteryCapacity: batteryCapacity.toLocaleString(language) })
307
- : t('vehicleProps:value.na');
308
- }
309
- },
310
-
311
- chargingDuration230V: {
312
- title: t('vehicleProps:title.chargingDuration230V'),
313
- get value() {
314
- const batteryChargingDuration230VSelect = car.battery && car.battery.batteryChargingDuration230VSelect;
315
- const batteryChargingDuration230VHour = car.battery && car.battery.batteryChargingDuration230VHour;
316
- const batteryCharchingDuration230VMinutesHours = car.battery && car.battery.batteryCharchingDuration230VMinutesHours;
317
-
318
- return batteryChargingDuration230VSelect
319
- ? `${batteryChargingDuration230VHour ? `${batteryChargingDuration230VHour} ${isCheckedBatteryTime(batteryCharchingDuration230VMinutesHours, t)}` : ''} ${batteryChargingDuration230VSelect}`
320
- : t('vehicleProps:value.na');
321
- }
322
- },
323
- chargingDurationMaxSpeed: {
324
- title: t('vehicleProps:title.chargingDurationMaxSpeed'),
325
- get value() {
326
- const batteryChargingDurationMaxSelect = car.battery && car.battery.batteryChargingDurationMaxSelect;
327
- const batteryChargingDurationMaxHour = car.battery && car.battery.batteryChargingDurationMaxHour;
328
- const batteryCharchingDurationMaxSelectMinutesHours = car.battery && car.battery.batteryCharchingDurationMaxSelectMinutesHours;
329
-
330
- return batteryChargingDurationMaxSelect
331
- ? `${batteryChargingDurationMaxHour ? `${batteryChargingDurationMaxHour} ${isCheckedBatteryTime(batteryCharchingDurationMaxSelectMinutesHours, t)}` : ''} ${batteryChargingDurationMaxSelect}`
332
- : t('vehicleProps:value.na');
333
- }
334
- },
335
- batteryChargerType: {
336
- title: t('vehicleProps:title.batteryChargerType'),
337
- get value() {
338
- const batteryChargerType = car.battery && car.battery.batteryChargerType;
339
-
340
- return isPropDefined(batteryChargerType)
341
- ? batteryChargerType.map((item: any) => t(`cbd:${item}`)).join('\n')
342
- : t('vehicleProps:value.na');
343
- }
344
- },
345
- hsn: {
346
- title: 'HSN',
347
- get value() {
348
- const hsn = car.metaData.hsn;
349
- return isPropDefined(hsn) ? hsn : t('vehicleProps:value.na');
350
- }
351
- },
352
-
353
- tsn: {
354
- title: 'TSN',
355
- get value() {
356
- const tsn = car.metaData.tsn;
357
- return isPropDefined(tsn) ? tsn : t('vehicleProps:value.na');
358
- }
359
- },
360
-
361
- category: {
362
- title: t('vehicleProps:title.category'),
363
- get value() {
364
- return isPropDefined(category) ? t(`cbd:${category}`) : t('vehicleProps:value.na');
365
- }
366
- },
367
-
368
- length: {
369
- title: t('vehicleProps:title.length'),
370
- get value() {
371
- const length = car.sizeVolumeWeight && car.sizeVolumeWeight.length;
372
- return Number.isFinite(length)
373
- ? t('vehicleProps:value.length', { size: length.toLocaleString(language) })
374
- : t('vehicleProps:value.na');
375
- }
376
- },
377
-
378
- width: {
379
- title: t('vehicleProps:title.width'),
380
- get value() {
381
- const width = car.sizeVolumeWeight && car.sizeVolumeWeight.width;
382
- return Number.isFinite(width)
383
- ? t('vehicleProps:value.width', { size: width.toLocaleString(language) })
384
- : t('vehicleProps:value.na');
385
- }
386
- },
387
-
388
- height: {
389
- title: t('vehicleProps:title.height'),
390
- get value() {
391
- const height = car.sizeVolumeWeight && car.sizeVolumeWeight.height;
392
- return Number.isFinite(height)
393
- ? t('vehicleProps:value.height', { size: height.toLocaleString(language) })
394
- : t('vehicleProps:value.na');
395
- }
396
- },
397
-
398
- base: {
399
- title: t('vehicleProps:title.base'),
400
- get value() {
401
- const wheelBase = car.driveSuspension.wheelBase;
402
- return Number.isFinite(wheelBase)
403
- ? t('vehicleProps:value.base', { size: wheelBase.toLocaleString(language) })
404
- : t('vehicleProps:value.na');
405
- }
406
- },
407
-
408
- capacityLoad: {
409
- title: t('vehicleProps:title.loadingVolume'),
410
- get value() {
411
- const completeCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.completeCapacity;
412
- return Number.isFinite(completeCapacity)
413
- ? t('vehicleProps:value.capacityLoad', { capacity: completeCapacity.toLocaleString(language) })
414
- : t('vehicleProps:value.na');
415
- }
416
- },
417
-
418
- bootCapacity: {
419
- title: t('vehicleProps:title.bootCapacity'),
420
- get value() {
421
- const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
422
- return Number.isFinite(cargoCapacity)
423
- ? t('vehicleProps:value.bootCapacity', { capacity: cargoCapacity.toLocaleString(language) })
424
- : t('vehicleProps:value.na');
425
- }
426
- },
427
-
428
- doors: {
429
- title: t('vehicleProps:title.doors'),
430
- get value() { return doors > 0 ? doors : t('vehicleProps:value.na'); }
431
- },
432
-
433
- seats: {
434
- title: t('vehicleProps:title.seats'),
435
- get value() { return seats > 0 ? seats : t('vehicleProps:value.na'); }
436
- },
437
-
438
- tare: {
439
- title: t('vehicleProps:title.tare'),
440
- get value() {
441
- const emptyWeight = car.sizeVolumeWeight && car.sizeVolumeWeight.emptyWeight;
442
- return Number.isFinite(emptyWeight)
443
- ? t('vehicleProps:value.tareWeight', { weight: (emptyWeight).toLocaleString(language) })
444
- : t('vehicleProps:value.na');
445
- }
446
- },
447
-
448
- maximumWeight: {
449
- title: t('vehicleProps:title.maximumWeight'),
450
- get value() {
451
- const maxWeight = car.sizeVolumeWeight && car.sizeVolumeWeight.maxWeight;
452
- return Number.isFinite(maxWeight)
453
- ? t('vehicleProps:value.maximumWeightCapacity', { capacity: maxWeight.toLocaleString(language) })
454
- : t('vehicleProps:value.na');
455
- }
456
- },
457
-
458
- trailerWeightBraked: {
459
- title: t('vehicleProps:title.trailerLoadBraked'),
460
- get value() {
461
- const trailerWeightBraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightBraked;
462
- return Number.isFinite(trailerWeightBraked)
463
- ? t('vehicleProps:value.weight', { weight: trailerWeightBraked.toLocaleString(language) })
464
- : t('vehicleProps:value.na');
465
- }
466
- },
467
-
468
- trailerWeightUnbraked: {
469
- title: t('vehicleProps:title.trailerLoadUnbraked'),
470
- get value() {
471
- const trailerWeightUnbraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightUnbraked;
472
- return Number.isFinite(trailerWeightUnbraked)
473
- ? t('vehicleProps:value.weight', { weight: trailerWeightUnbraked.toLocaleString(language) })
474
- : t('vehicleProps:value.na');
475
- }
476
- },
477
-
478
- consumptionInner: {
479
- icon: 'fuelConsumption',
480
- title: t('vehicleProps:title.consumptionInner'),
481
- get value() {
482
- const consumptionInner = car.consumption.consumptionInner;
483
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
484
- const translatedUnit = t(`cbd:${consumptionUnit}`);
485
- return Number.isFinite(consumptionInner)
486
- ? t('vehicleProps:value.consumption', { consumption: consumptionInner.toLocaleString(language), unit: translatedUnit })
487
- : t('vehicleProps:value.na');
488
- }
489
- },
490
-
491
- consumptionPowerInner: {
492
- icon: 'fuelConsumption',
493
- title: t('vehicleProps:title.consumptionPowerInner'),
494
- get value() {
495
- const consumptionPowerInner = car.consumption.consumptionInner;
496
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
497
- const translatedUnit = t(`cbd:${consumptionUnit}`);
498
- return Number.isFinite(consumptionPowerInner)
499
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
500
- : t('vehicleProps:value.na');
501
- }
502
- },
503
-
504
- consumptionPowerHybridInner: {
505
- icon: 'fuelConsumption',
506
- title: t('vehicleProps:title.consumptionPowerInner'),
507
- get value() {
508
- const consumptionPowerInner = car.consumption.consumptionPowerInner;
509
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
510
- const translatedUnit = t(`cbd:${consumptionUnit}`);
511
- return Number.isFinite(consumptionPowerInner)
512
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
513
- : t('vehicleProps:value.na');
514
- }
515
- },
516
-
517
- consumptionHydrogenInner: {
518
- icon: 'fuelConsumption',
519
- title: t('vehicleProps:title.consumptionHydrogenInner'),
520
- get value() {
521
- const consumptionHydrogenInner = car.consumption.consumptionInner;
522
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
523
- const translatedUnit = t(`cbd:${consumptionUnit}`);
524
- return Number.isFinite(consumptionHydrogenInner)
525
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenInner.toLocaleString(language), unit: translatedUnit })
526
- : t('vehicleProps:value.na');
527
- }
528
- },
529
- consumptionGasInner: {
530
- icon: 'fuelConsumption',
531
- title: t('vehicleProps:title.consumptionGasInner'),
532
- get value() {
533
- const consumptionGasInner = car.consumption.consumptionInner;
534
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
535
- const translatedUnit = t(`cbd:${consumptionUnit}`);
536
- return Number.isFinite(consumptionGasInner)
537
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasInner.toLocaleString(language), unit: translatedUnit })
538
- : t('vehicleProps:value.na');
539
- }
540
- },
541
-
542
- consumptionOuter: {
543
- icon: 'fuelConsumption',
544
- title: t('vehicleProps:title.consumptionOuter'),
545
- get value() {
546
- const consumptionOuter = car.consumption.consumptionOuter;
547
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
548
- const translatedUnit = t(`cbd:${consumptionUnit}`);
549
- return Number.isFinite(consumptionOuter)
550
- ? t('vehicleProps:value.consumption', { consumption: consumptionOuter.toLocaleString(language), unit: translatedUnit })
551
- : t('vehicleProps:value.na');
552
- }
553
- },
554
-
555
- consumptionPowerOuter: {
556
- icon: 'fuelConsumption',
557
- title: t('vehicleProps:title.consumptionPowerOuter'),
558
- get value() {
559
- const consumptionPowerOuter = car.consumption.consumptionOuter;
560
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
561
- const translatedUnit = t(`cbd:${consumptionUnit}`);
562
- return Number.isFinite(consumptionPowerOuter)
563
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
564
- : t('vehicleProps:value.na');
565
- }
566
- },
567
-
568
- consumptionPowerHybridOuter: {
569
- icon: 'fuelConsumption',
570
- title: t('vehicleProps:title.consumptionPowerOuter'),
571
- get value() {
572
- const consumptionPowerOuter = car.consumption.consumptionPowerOuter;
573
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
574
- const translatedUnit = t(`cbd:${consumptionUnit}`);
575
- return Number.isFinite(consumptionPowerOuter)
576
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
577
- : t('vehicleProps:value.na');
578
- }
579
- },
580
-
581
- consumptionHydrogenOuter: {
582
- icon: 'fuelConsumption',
583
- title: t('vehicleProps:title.consumptionHydrogenOuter'),
584
- get value() {
585
- const consumptionHydrogenOuter = car.consumption.consumptionOuter;
586
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
587
- const translatedUnit = t(`cbd:${consumptionUnit}`);
588
- return Number.isFinite(consumptionHydrogenOuter)
589
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenOuter.toLocaleString(language), unit: translatedUnit })
590
- : t('vehicleProps:value.na');
591
- }
592
- },
593
-
594
- consumptionGasOuter: {
595
- icon: 'fuelConsumption',
596
- title: t('vehicleProps:title.consumptionGasOuter'),
597
- get value() {
598
- const consumptionGasOuter = car.consumption.consumptionOuter;
599
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
600
- const translatedUnit = t(`cbd:${consumptionUnit}`);
601
- return Number.isFinite(consumptionGasOuter)
602
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasOuter.toLocaleString(language), unit: translatedUnit })
603
- : t('vehicleProps:value.na');
604
- }
605
- },
606
-
607
- consumptionCombined: {
608
- icon: 'fuelConsumption',
609
- title: t('vehicleProps:title.сonsumptionCombined'),
610
- get value() {
611
- const consumptionCombined = car.consumption.consumptionCombined;
612
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
613
- const translatedUnit = t(`cbd:${consumptionUnit}`);
614
- return Number.isFinite(consumptionCombined)
615
- ? t('vehicleProps:value.consumption', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
616
- : t('vehicleProps:value.na');
617
- }
618
- },
619
-
620
- consumptionPowerCombined: {
621
- icon: 'fuelConsumption',
622
- title: t('vehicleProps:title.consumptionPowerCombined'),
623
- get value() {
624
- const consumptionPowerCombined = car.consumption.consumptionCombined;
625
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
626
- const translatedUnit = t(`cbd:${consumptionUnit}`);
627
- return Number.isFinite(consumptionPowerCombined)
628
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
629
- : t('vehicleProps:value.na');
630
- }
631
- },
632
-
633
- consumptionPowerHybridCombined: {
634
- icon: 'fuelConsumption',
635
- title: t('vehicleProps:title.consumptionPowerCombined'),
636
- get value() {
637
- const consumptionPowerCombined = car.consumption.consumptionPowerCombined;
638
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
639
- const translatedUnit = t(`cbd:${consumptionUnit}`);
640
- return Number.isFinite(consumptionPowerCombined)
641
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
642
- : t('vehicleProps:value.na');
643
- }
644
- },
645
-
646
- consumptionHydrogenCombined: {
647
- icon: 'fuelConsumption',
648
- title: t('vehicleProps:title.consumptionHydrogenCombined'),
649
- get value() {
650
- const consumptionHydrogenCombined = car.consumption.consumptionCombined;
651
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
652
- const translatedUnit = t(`cbd:${consumptionUnit}`);
653
- return Number.isFinite(consumptionHydrogenCombined)
654
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
655
- : t('vehicleProps:value.na');
656
- }
657
- },
658
-
659
- consumptionGasCombined: {
660
- icon: 'fuelConsumption',
661
- title: t('vehicleProps:title.consumptionGasCombined'),
662
- get value() {
663
- const consumptionGasCombined = car.consumption.consumptionCombined;
664
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
665
- const translatedUnit = t(`cbd:${consumptionUnit}`);
666
- return Number.isFinite(consumptionGasCombined)
667
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
668
- : t('vehicleProps:value.na');
669
- }
670
- },
671
-
672
- consumptionCombinedAlternateView: {
673
- icon: 'fuelConsumption',
674
- get value() {
675
- const consumptionCombined = car.consumption.consumptionCombined;
676
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
677
- const translatedUnit = t(`cbd:${consumptionUnit}`);
678
- const wltpConsumptionCombined = car.consumption.wltpCombined;
679
- const wltpCo2 = car.environmentEmissions.wltpCo2;
680
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
681
-
682
- const co2 = car.environmentEmissions.co2;
683
-
684
- const wltpConsumptionValue = Number.isFinite(wltpConsumptionCombined)
685
- ? t('vehicleProps:value.consumptionCombined', { consumption: wltpConsumptionCombined.toLocaleString(language), unit: translatedUnit })
686
- : null;
687
-
688
- const wltpCo2Value = Number.isFinite(wltpCo2)
689
- ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
690
- : null;
691
-
692
- const consumptionValue = Number.isFinite(consumptionCombined)
693
- ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
694
- : t('vehicleProps:value.na');
695
-
696
- const co2Value = Number.isFinite(co2)
697
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
698
- : t('vehicleProps:value.na');
699
-
700
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
701
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
702
- : null;
703
-
704
- if (wltpConsumptionValue && wltpCo2Value) {
705
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
706
- }
707
-
708
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
709
- }
710
- },
711
- consumptionPowerCombinedAlternateView: {
712
- icon: 'fuelConsumption',
713
- title: t('vehicleProps:title.consumptionPowerCombined'),
714
- get value() {
715
- const consumptionPowerCombined = car.consumption.consumptionCombined;
716
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
717
- const translatedUnit = t(`cbd:${consumptionUnit}`);
718
- const co2 = car.environmentEmissions.co2;
719
- const wltpConsumptionPowerCombined = car.consumption.wltpPowerCombined;
720
- const wltpCo2 = car.environmentEmissions.wltpCo2;
721
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
722
-
723
- const wltpConsumptionValue = Number.isFinite(wltpConsumptionPowerCombined)
724
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
725
- : null;
726
-
727
- const wltpCo2Value = Number.isFinite(wltpCo2)
728
- ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
729
- : null;
730
-
731
- const consumptionValue = Number.isFinite(consumptionPowerCombined)
732
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
733
- : t('vehicleProps:value.na');
734
-
735
- const co2Value = Number.isFinite(co2)
736
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
737
- : t('vehicleProps:value.na');
738
-
739
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
740
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
741
- : null;
742
-
743
- if (wltpConsumptionValue && wltpCo2Value) {
744
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
745
- }
746
-
747
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
748
- }
749
- },
750
- consumptionHydrogenCombinedAlternateView: {
751
- icon: 'fuelConsumption',
752
- title: t('vehicleProps:title.consumptionHydrogenCombined'),
753
- get value() {
754
- const consumptionHydrogenCombined = car.consumption.consumptionCombined;
755
- const wltpConsumptionCombined = car.consumption.wltpCombined;
756
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
757
- const translatedUnit = t(`cbd:${consumptionUnit}`);
758
- const co2 = car.environmentEmissions.co2;
759
- const wltpCo2 = car.environmentEmissions.wltpCo2;
760
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
761
-
762
- const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
763
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
764
- : t('vehicleProps:value.na');
765
-
766
- const wltpConsumptionValue = Number.isFinite(wltpConsumptionCombined)
767
- ? t('vehicleProps:value.consumptionGas', { consumption: wltpConsumptionCombined.toLocaleString(language), unit: translatedUnit })
768
- : null;
769
-
770
- const co2Value = Number.isFinite(co2)
771
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
772
- : t('vehicleProps:value.na');
773
-
774
- const wltpCo2Value = Number.isFinite(wltpCo2)
775
- ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
776
- : null;
777
-
778
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
779
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
780
- : null;
781
-
782
- if (wltpConsumptionValue && wltpCo2Value) {
783
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
784
- }
785
-
786
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
787
- }
788
- },
789
- consumptionGasCombinedAlternateView: {
790
- icon: 'fuelConsumption',
791
- title: t('vehicleProps:title.consumptionGasCombined'),
792
- get value() {
793
- const consumptionGasCombined = car.consumption.consumptionCombined;
794
- const wltpConsumptionCombined = car.consumption.wltpCombined;
795
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
796
- const translatedUnit = t(`cbd:${consumptionUnit}`);
797
-
798
- const co2 = car.environmentEmissions.co2;
799
- const wltpCo2 = car.environmentEmissions.wltpCo2;
800
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
801
-
802
- const consumptionValue = Number.isFinite(consumptionGasCombined)
803
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
804
- : t('vehicleProps:value.na');
805
-
806
- const co2Value = Number.isFinite(co2)
807
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
808
- : t('vehicleProps:value.na');
809
-
810
- const wltpConsumptionValue = Number.isFinite(wltpConsumptionCombined)
811
- ? t('vehicleProps:value.consumptionGas', { consumption: wltpConsumptionCombined.toLocaleString(language), unit: translatedUnit })
812
- : null;
813
-
814
- const wltpCo2Value = Number.isFinite(wltpCo2)
815
- ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
816
- : null;
817
-
818
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
819
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
820
- : null;
821
-
822
- if (wltpConsumptionValue && wltpCo2Value) {
823
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
824
- }
825
-
826
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
827
- }
828
- },
829
-
830
- consumptionCombinedHybridAlternateView: {
831
- icon: 'fuelConsumption',
832
- get value() {
833
- const consumptionCombined = +car.consumption.consumptionCombined;
834
- const consumptionPowerCombined = +car.consumption.consumptionPowerCombined;
835
- // const wltpPowerCombined = car.consumption.wltpPowerCombined || car.consumption.wltpWeightedPowerCombined;
836
- const wltpCombined = car.consumption.wltpCombined;
837
- const wltpWeightedCombined = car.consumption.wltpWeightedCombined;
838
- const wltpWeightedPowerCombined = car.consumption.wltpWeightedPowerCombined;
839
-
840
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
841
- const translatedUnit = t(`cbd:${consumptionUnit}`);
842
-
843
- const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
844
- // const wltpConsumptionPowerCombinedContent = wltpPowerCombined
845
- // ? t('vehicleProps:value.consumptionPowerCombined', { consumption: wltpPowerCombined.toLocaleString(language), unit: translatedUnit })
846
- // : null;
847
-
848
- const wltpConsumptionWeightedPowerCombinedContent = wltpWeightedPowerCombined
849
- ? t('vehicleProps:value.consumptionPowerCombined', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit })
850
- : null;
851
- const consumptionCombinedContent = t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit });
852
- const wltpConsumptionCombinedContent = wltpCombined ?
853
- t('vehicleProps:value.consumptionCombined', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
854
- : null;
855
- const wltpConsumptionWeightedCombinedContent = wltpWeightedCombined ?
856
- t('vehicleProps:value.consumptionCombined', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit })
857
- : null;
858
-
859
- const co2 = car.environmentEmissions.co2;
860
- const wltpCo2 = car.environmentEmissions.wltpCo2;
861
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
862
- const co2Value = Number.isFinite(co2)
863
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
864
- : t('vehicleProps:value.na');
865
- const wltpCo2Value = Number.isFinite(wltpCo2)
866
- ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
867
- : null;
868
- const wltpCo2PluginValue = Number.isFinite(wltpCo2)
869
- ? t('vehicleProps:value.wltpCo2WtdCombined', { co2: wltpCo2.toLocaleString(language) })
870
- : null;
871
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
872
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
873
- : null;
874
- // ADV-88: "is a hybrid car" is now determined by fuel type (hybrid electric + diesel/petrol),
875
- // not engineData.hybridPlugin.
876
- const hybridPlugin = car.consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
877
- || car.consumption.fuel === 'selector_fuel_hybridElectricalPetrol';
878
-
879
- // ADV-88: ANY hybrid car (new or used) shows both weighted (gew., komb) and discharged
880
- // (entladen, komb) fuel consumption + a discharged CO2 class.
881
- if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
882
- const ADV88_DEFAULT_DISCHARGED_COMBINED = 19.9;
883
- const ADV88_DEFAULT_DISCHARGED_CO2_CLASS = 'selector_energyEfficiencyClass_g';
884
-
885
- const dischargedCombined = Number.isFinite(wltpCombined) ? wltpCombined : ADV88_DEFAULT_DISCHARGED_COMBINED;
886
- const dischargedClass = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass || ADV88_DEFAULT_DISCHARGED_CO2_CLASS;
887
-
888
- const weightedCombinedLabeled = t('vehicleProps:value.wltpWeightedCombinedLabel', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit });
889
- const dischargedCombinedLabeled = t('vehicleProps:value.wltpDischargedCombinedLabel', { consumption: dischargedCombined.toLocaleString(language), unit: translatedUnit });
890
- const co2WeightedContent = Number.isFinite(wltpCo2)
891
- ? t('vehicleProps:value.wltpCo2WtdCombinedShort', { co2: wltpCo2.toLocaleString(language) })
892
- : null;
893
- const co2ClassWeighted = isPropDefined(wltpEnergyEfficiencyClass)
894
- ? t('vehicleProps:value.co2ClassWeighted', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
895
- : null;
896
- const co2ClassDischarged = t('vehicleProps:value.co2ClassDischarged', { class: t(`cbd:${dischargedClass}`) });
897
-
898
- return <React.Fragment>
899
- {wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{' + '}
900
- {wrapValue(weightedCombinedLabeled)}{', '}
901
- {wrapValue(dischargedCombinedLabeled)}
902
- {co2WeightedContent && <>{', '}{wrapValue(co2WeightedContent)}</>}
903
- {co2ClassWeighted && <>{', '}{co2ClassWeighted}</>}
904
- {', '}{co2ClassDischarged}
905
- </React.Fragment>
906
- }
907
-
908
- if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
909
- return <React.Fragment>
910
- {wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{', '}
911
- {wrapValue(wltpConsumptionWeightedCombinedContent)}{', '}
912
- {wrapValue(wltpCo2PluginValue)}
913
- {co2ClassValue && <><br />{co2ClassValue}</>}
914
- </React.Fragment>
915
- }
916
-
917
- if (wltpConsumptionCombinedContent && wltpCo2Value) {
918
- return <React.Fragment>
919
- {wrapValue(wltpConsumptionCombinedContent)}{', '}
920
- {wrapValue(wltpCo2Value)}
921
- {co2ClassValue && <><br />{co2ClassValue}</>}
922
- </React.Fragment>
923
- }
924
-
925
- return Number.isFinite(consumptionCombined) && Number.isFinite(consumptionPowerCombined)
926
- ? <React.Fragment>
927
- {consumptionPowerCombined && hybridPlugin ? wrapValue(consumptionPowerCombinedContent) : ''}
928
- {consumptionPowerCombined && hybridPlugin ? <br /> : ''}
929
- {wrapValue(consumptionCombinedContent)} <br />
930
- {wrapValue(co2Value)}
931
- {co2ClassValue && <><br />{co2ClassValue}</>}
932
- </React.Fragment>
933
- : t('vehicleProps:value.na');
934
- }
935
- },
936
-
937
- rangeHydrogen: {
938
- title: t('vehicleProps:title.rangeHydrogen'),
939
- get value() {
940
- const { rangeHydrogen } = car.engineData;
941
- return Number.isFinite(rangeHydrogen)
942
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: rangeHydrogen.toLocaleString(language) })
943
- : t('vehicleProps:value.na');
944
- }
945
- },
946
- batteryRangeElectric: {
947
- title: t('vehicleProps:title.batteryRangeElectric'),
948
- get value() {
949
- const batteryRangeElectric = car.battery && car.battery.batteryRangeElectric;
950
- return Number.isFinite(batteryRangeElectric)
951
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: batteryRangeElectric.toLocaleString(language) })
952
- : t('vehicleProps:value.na');
953
- }
954
- },
955
-
956
- c02: {
957
- title: t('vehicleProps:title.co2'),
958
- get value() {
959
- const c02 = car.environmentEmissions.co2;
960
- return Number.isFinite(c02)
961
- ? t('vehicleProps:value.co2', { co2: c02.toLocaleString(language) })
962
- : t('vehicleProps:value.na');
963
- }
964
- },
965
-
966
- consumptionAndCo2: {
967
- title: t('vehicleProps:title.consumptionAndCo2'),
968
- get value() {
969
- const consumptionPowerCombined = car.consumption.consumptionCombined;
970
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
971
- const translatedUnit = t(`cbd:${consumptionUnit}`);
972
- const co2 = car.environmentEmissions.co2;
973
- const consumptionValue = Number.isFinite(consumptionPowerCombined)
974
- ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
975
- : t('vehicleProps:value.na');
976
- const co2Value = Number.isFinite(co2)
977
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
978
- : t('vehicleProps:value.na');
979
-
980
- return `${consumptionValue} | ${co2Value}`;
981
- }
982
- },
983
- emissionClass: {
984
- title: t('vehicleProps:title.emissionClass'),
985
- get value() {
986
- const emissionClass = car.environmentEmissions.emissionClass;
987
- return isPropDefined(emissionClass) ? t(`cbd:${emissionClass}`) : t('vehicleProps:value.na');
988
- }
989
- },
990
-
991
- emissionSticker: {
992
- title: t('vehicleProps:title.emissionsSticker'),
993
- get value() {
994
- const emissionSticker = car.environmentEmissions.emissionSticker;
995
- let icon = null;
996
- const size = 25;
997
-
998
- if (emissionSticker !== 'selector_emissionSticker_no') {
999
- icon = EMISSION_STICKERS_ICONS[emissionSticker];
1000
- }
1001
-
1002
- return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
1003
- }
1004
- },
1005
-
1006
- wpEmissionSticker: {
1007
- title: t('vehicleProps:title.emissionsSticker'),
1008
- get value() {
1009
- const emissionSticker = car.environmentEmissions.emissionSticker;
1010
- let icon = null;
1011
- const size = 25;
1012
-
1013
- if (emissionSticker !== 'selector_emissionSticker_no') {
1014
- icon = WP_EMISSION_STICKERS_ICONS[emissionSticker];
1015
- }
1016
-
1017
- return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
1018
- }
1019
- },
1020
-
1021
- energyEfficiencyClass: {
1022
- title: t('vehicleProps:title.energyEfficiencyClass'),
1023
- subTitle: t('vehicleProps:title.subTitle'),
1024
- get value() {
1025
- const level = car.environmentEmissions.energyEfficiencyClass;
1026
- return isPropDefined(level) ? <CO2Efficiency level={level} t={t} /> : t('vehicleProps:value.na');
1027
- }
1028
- },
1029
-
1030
- offerAvailability: {
1031
- title: t('vehicleProps:title.offerAvailability'),
1032
- icon: 'carAvailability',
1033
- get value() {
1034
- const offerAvailabilityMode = offer.availabilityMode;
1035
- const offerAvailabilityTimestamp = offer.availabilityFrom;
1036
- const humanViewTime = moment.unix(offerAvailabilityTimestamp).format('DD.MM.YYYY');
1037
- let offerAvailability: string;
1038
-
1039
- switch (offerAvailabilityMode) {
1040
- case 'selector_availabilityMode_always':
1041
- offerAvailability = t(`cbd:${offerAvailabilityMode}`);
1042
- break;
1043
-
1044
- case 'selector_availabilityMode_fromDate':
1045
- if (offer.deliveryPeriod != null && offer.deliveryPeriod !== 'selector_unknown') {
1046
- offerAvailability = formatDeliveryPeriod(t, offer.deliveryPeriod);
1047
- break;
1048
- }
1049
-
1050
- if (moment.utc(offerAvailabilityTimestamp, 'X').isBefore()) {
1051
- offerAvailability = t('cbd:selector_availabilityMode_always');
1052
- } else if (!!offerAvailabilityTimestamp) {
1053
- offerAvailability = t('vehicleProps:value.fromDate', { date: humanViewTime });
1054
- } else {
1055
- offerAvailability = t('vehicleProps:value.onRequest'); // case when "availabilityFrom" is undefined
1056
- }
1057
- break;
1058
-
1059
- default:
1060
- if (!offerAvailabilityMode && !firstRegistration && !mileage) offerAvailability = t('vehicleProps:value.onRequest');
1061
- else offerAvailability = null;
1062
- }
1063
- return isPropDefined(offerAvailability) ? offerAvailability : t('vehicleProps:value.na');
1064
- }
1065
- },
1066
-
1067
- lastTechnicalService: {
1068
- title: t('vehicleProps:title.lastTechnicalService'),
1069
- get value() {
1070
- const lastTechnicalService = car.careService.lastTechnicalService;
1071
- return Number.isFinite(lastTechnicalService)
1072
- ? formatTimestamp({ timestamp: lastTechnicalService, format: 'MM/YYYY' })
1073
- : t('vehicleProps:value.na');
1074
- }
1075
- },
1076
-
1077
- generalInspection: {
1078
- title: t('vehicleProps:title.generalInspection'),
1079
- get value() {
1080
- const generalInspection = car.careService.generalInspection;
1081
- if (car.offer.newHuAu) {
1082
- return t('vehicleProps:value.new');
1083
- // tslint:disable-next-line:no-else-after-return
1084
- }else {
1085
- return Number.isFinite(generalInspection)
1086
- ? formatTimestamp({ timestamp: generalInspection, format: 'MM/YYYY' })
1087
- : t('vehicleProps:value.na');
1088
- }
1089
- }
1090
- },
1091
-
1092
- condition: {
1093
- title: t('vehicleProps:title.сondition'),
1094
- get value() {
1095
- return isPropDefined(condition)
1096
- ? t(`cbd:${condition}`)
1097
- : t('vehicleProps:value.na');
1098
- }
1099
- },
1100
-
1101
- numberOfPreviousOwnersSimple: {
1102
- title: t('vehicleProps:title.numberOfPreviousOwners'),
1103
- get value() {
1104
- return Number.isFinite(numberOfPreviousOwners)
1105
- ? numberOfPreviousOwners
1106
- : t('vehicleProps:value.na');
1107
- }
1108
- },
1109
-
1110
- guarantee: {
1111
- title: t('vehicleProps:title.guarantee'),
1112
- get value() {
1113
- const guarantee = car.offer.warranty;
1114
- return isPropDefined(guarantee)
1115
- ? (guarantee ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
1116
- : t('vehicleProps:value.na');
1117
- }
1118
- },
1119
-
1120
- maintenanceGuide: {
1121
- title: t('vehicleProps:title.maintenanceGuide'),
1122
- get value() {
1123
- const fullserviceHistory = car.careService.fullServiceHistory;
1124
- return isPropDefined(fullserviceHistory)
1125
- ? (fullserviceHistory ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
1126
- : t('vehicleProps:value.na');
1127
- }
1128
- },
1129
-
1130
- nonSmokerVehicle: {
1131
- title: t('vehicleProps:title.nonSmokingVehicle'),
1132
- get value() {
1133
- return isPropDefined(nonSmokerVehicle)
1134
- ? (nonSmokerVehicle ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
1135
- : t('vehicleProps:value.na');
1136
- }
1137
- },
1138
-
1139
- manufacturerColorName: {
1140
- title: t('vehicleProps:title.manufacturerColorName'),
1141
- get value() {
1142
- const color = car.exterior.manufacturerColorName;
1143
-
1144
- if (typeof color !== 'string' || color === '') {
1145
- return t('vehicleProps:value.na');
1146
- }
1147
-
1148
- return color[0].toUpperCase() + color.slice(1);
1149
- }
1150
- },
1151
-
1152
- exteriorColor: {
1153
- title: t('vehicleProps:title.colour'),
1154
- get value() {
1155
- const exteriorColor = car.exterior.exteriorColor;
1156
- return isPropDefined(exteriorColor)
1157
- ? t(`cbd:${exteriorColor.replace('exterior_', '')}`)
1158
- : t('vehicleProps:value.na');
1159
- }
1160
- },
1161
-
1162
- appointmentsColor: {
1163
- title: t('vehicleProps:title.appointmentsColor'),
1164
- get value() {
1165
- const interiorColor = car.interior.interiorColor;
1166
- return isPropDefined(interiorColor)
1167
- ? t(`cbd:${interiorColor.replace('interior_', '')}`)
1168
- : t('vehicleProps:value.na');
1169
- }
1170
- },
1171
-
1172
- interiorType: {
1173
- title: t('vehicleProps:title.interiorType'),
1174
- get value() {
1175
- const interiorType = car.interior.interiorType;
1176
- return isPropDefined(interiorType)
1177
- ? t(`cbd:${interiorType}`)
1178
- : t('vehicleProps:value.na');
1179
- }
1180
- },
1181
- signOfUse : {
1182
- title: t('vehicleProps:title.signsOfUse'),
1183
- isVisible: mileage > 100, // tslint:disable-line
1184
- isLongTitle: true,
1185
- get value() {
1186
- return t('vehicleProps:value.yes');
1187
- }
1188
- },
1189
- countryVersion : {
1190
- title: t('vehicleProps:title.countryVersion'),
1191
- get value() {
1192
- const countryName = car.countryActive[language];
1193
- if (!countryVersion) return t('vehicleProps:value.na');
1194
- switch (countryVersion) {
1195
- case 'de':
1196
- return t('vehicleProps:value.countryDEversion');
1197
- break;
1198
- case 'eu':
1199
- return t('vehicleProps:value.countryEUversion');
1200
- break;
1201
- case 'at':
1202
- return t('vehicleProps:value.countryATversion');
1203
- break;
1204
- default:
1205
- return t('vehicleProps:value.countryVersionName', { countryName });
1206
- }
1207
- }
1208
- },
1209
- wltpCo2: {
1210
- title: t('vehicleProps:title.wltpCo2'),
1211
- get value() {
1212
- const c02 = car.environmentEmissions.wltpCo2;
1213
- return Number.isFinite(c02)
1214
- ? t('vehicleProps:value.wltpCo2', { co2: c02.toLocaleString(language) })
1215
- : t('vehicleProps:value.na');
1216
- }
1217
- },
1218
- wltpCo2Plugin: {
1219
- title: t('vehicleProps:title.wltpCo2Plugin'),
1220
- get value() {
1221
- const c02 = car.environmentEmissions.wltpCo2;
1222
- return Number.isFinite(c02)
1223
- ? t('vehicleProps:value.wltpCo2', { co2: c02.toLocaleString(language) })
1224
- : t('vehicleProps:value.na');
1225
- }
1226
- },
1227
- wltpCo2Discharged: {
1228
- title: t('vehicleProps:title.wltpCo2Discharged'),
1229
- get value() {
1230
- const wltpCo2 = car.environmentEmissions.wltpCo2Discharged;
1231
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1232
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1233
- return Number.isFinite(wltpCo2)
1234
- ? t('vehicleProps:value.wltpCo2', { co2: wltpCo2.toLocaleString(language), unit: translatedUnit })
1235
- : t('vehicleProps:value.na');
1236
- }
1237
- },
1238
- wltpEnergyEfficiencyClass: {
1239
- // title: t('vehicleProps:title.wltpEnergyEfficiencyClass'),
1240
- // subTitle: t('vehicleProps:title.subTitle'),
1241
- get value() {
1242
- const level = car.environmentEmissions.wltpEnergyEfficiencyClass;
1243
- const wltpLevel = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass;
1244
- const { hybridPlugin } = car.engineData;
1245
- const subtitle = hybridPlugin ? t('vehicleProps:title.wltpCO2SubTitle') : t('vehicleProps:title.wltpCO2SubTitleComb');
1246
- return isPropDefined(level) ?
1247
- <CO2Efficiency
1248
- title={t('vehicleProps:title.wltpCO2Title')}
1249
- subTitle={subtitle}
1250
- wltpLevel={wltpLevel}
1251
- level={level}
1252
- t={t}
1253
- levelTitle={t('vehicleProps:title.wltpCO2WidgetComb')}
1254
- wltpLevelTitle={t('vehicleProps:title.wltpCO2WidgetDischargedBattery')}
1255
- hybridPlugin={hybridPlugin}
1256
- isWltp
1257
- /> : t('vehicleProps:value.na');
1258
- }
1259
- },
1260
- wltpDischargedEnergyEfficiencyClass: {
1261
- title: t('vehicleProps:title.wltpDischargedEnergyEfficiencyClass'),
1262
- subTitle: t('vehicleProps:title.subTitle'),
1263
- get value() {
1264
- const level = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass;
1265
- return isPropDefined(level) ? <CO2Efficiency level={level} isWltp t={t} /> : t('vehicleProps:value.na');
1266
- }
1267
- },
1268
- wltpRange: {
1269
- title: t('vehicleProps:title.wltpRange'),
1270
- get value() {
1271
- const wltpRange = car.battery && car.battery.wltpRange;
1272
- return Number.isFinite(wltpRange)
1273
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpRange.toLocaleString(language) })
1274
- : t('vehicleProps:value.na');
1275
- }
1276
- },
1277
- wltpTotalRange: {
1278
- title: t('vehicleProps:title.wltpTotalRange'),
1279
- get value() {
1280
- const wltpTotalRange = car.battery && car.battery.wltpTotalRange;
1281
- return Number.isFinite(wltpTotalRange)
1282
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpTotalRange.toLocaleString(language) })
1283
- : t('vehicleProps:value.na');
1284
- }
1285
- },
1286
-
1287
- wltpRangeCity: {
1288
- title: t('vehicleProps:title.wltpRangeCity'),
1289
- get value() {
1290
- const wltpRangeCity = car.battery && car.battery.wltpRangeCity;
1291
- return Number.isFinite(wltpRangeCity)
1292
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpRangeCity.toLocaleString(language) })
1293
- : t('vehicleProps:value.na');
1294
- }
1295
- },
1296
- wltpTotalRangeCity: {
1297
- title: t('vehicleProps:title.wltpTotalRangeCity'),
1298
- get value() {
1299
- const wltpTotalRangeCity = car.battery && car.battery.wltpTotalRangeCity;
1300
- return Number.isFinite(wltpTotalRangeCity)
1301
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpTotalRangeCity.toLocaleString(language) })
1302
- : t('vehicleProps:value.na');
1303
- }
1304
- },
1305
- wltpWeightedCombined: {
1306
- title: t('vehicleProps:title.wltpWeightedCombined'),
1307
- get value() {
1308
- const wltpWeightedCombined = car.consumption.wltpWeightedCombined;
1309
- return Number.isFinite(wltpWeightedCombined)
1310
- ? t('vehicleProps:value.consumptionCombined', { consumption: wltpWeightedCombined.toLocaleString(language) })
1311
- : t('vehicleProps:value.na');
1312
- }
1313
- },
1314
- wltpCombined: {
1315
- title: t('vehicleProps:title.wltpCombined'),
1316
- get value() {
1317
- const wltpCombined = car.consumption.wltpCombined;
1318
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1319
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1320
- return Number.isFinite(wltpCombined)
1321
- ? t('vehicleProps:value.consumption', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
1322
- : t('vehicleProps:value.na');
1323
- }
1324
- },
1325
- wltpCombinedGas: {
1326
- title: t('vehicleProps:title.wltpCombined'),
1327
- get value() {
1328
- const wltpCombined = car.consumption.wltpCombined;
1329
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1330
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1331
- return Number.isFinite(wltpCombined)
1332
- ? t('vehicleProps:value.consumptionGas', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
1333
- : t('vehicleProps:value.na');
1334
- }
1335
- },
1336
- wltpCombinedPlugin: {
1337
- title: t('vehicleProps:title.wltpCombinedPlugin'),
1338
- get value() {
1339
- const wltpCombined = car.consumption.wltpCombined;
1340
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1341
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1342
- return Number.isFinite(wltpCombined)
1343
- ? t('vehicleProps:value.consumption', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
1344
- : t('vehicleProps:value.na');
1345
- }
1346
- },
1347
- wltpSlow: {
1348
- title: t('vehicleProps:title.wltpSlow'),
1349
- get value() {
1350
- const wltpSlow = car.consumption.wltpSlow;
1351
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1352
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1353
- return Number.isFinite(wltpSlow)
1354
- ? t('vehicleProps:value.consumption', { consumption: wltpSlow.toLocaleString(language), unit: translatedUnit })
1355
- : t('vehicleProps:value.na');
1356
- }
1357
- },
1358
- wltpSlowGas: {
1359
- title: t('vehicleProps:title.wltpSlow'),
1360
- get value() {
1361
- const wltpSlow = car.consumption.wltpSlow;
1362
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1363
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1364
- return Number.isFinite(wltpSlow)
1365
- ? t('vehicleProps:value.consumptionGas', { consumption: wltpSlow.toLocaleString(language), unit: translatedUnit })
1366
- : t('vehicleProps:value.na');
1367
- }
1368
- },
1369
- wltpSlowPlugin: {
1370
- title: t('vehicleProps:title.wltpSlowPlugin'),
1371
- get value() {
1372
- const wltpSlow = car.consumption.wltpSlow;
1373
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1374
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1375
- return Number.isFinite(wltpSlow)
1376
- ? t('vehicleProps:value.consumption', { consumption: wltpSlow.toLocaleString(language), unit: translatedUnit })
1377
- : t('vehicleProps:value.na');
1378
- }
1379
- },
1380
- wltpMedium: {
1381
- title: t('vehicleProps:title.wltpMedium'),
1382
- get value() {
1383
- const wltpMedium = car.consumption.wltpMedium;
1384
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1385
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1386
- return Number.isFinite(wltpMedium)
1387
- ? t('vehicleProps:value.consumption', { consumption: wltpMedium.toLocaleString(language), unit: translatedUnit })
1388
- : t('vehicleProps:value.na');
1389
- }
1390
- },
1391
- wltpMediumGas: {
1392
- title: t('vehicleProps:title.wltpMedium'),
1393
- get value() {
1394
- const wltpMedium = car.consumption.wltpMedium;
1395
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1396
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1397
- return Number.isFinite(wltpMedium)
1398
- ? t('vehicleProps:value.consumptionGas', { consumption: wltpMedium.toLocaleString(language), unit: translatedUnit })
1399
- : t('vehicleProps:value.na');
1400
- }
1401
- },
1402
- wltpMediumPlugin: {
1403
- title: t('vehicleProps:title.wltpMediumPlugin'),
1404
- get value() {
1405
- const wltpMedium = car.consumption.wltpMedium;
1406
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1407
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1408
- return Number.isFinite(wltpMedium)
1409
- ? t('vehicleProps:value.consumption', { consumption: wltpMedium.toLocaleString(language), unit: translatedUnit })
1410
- : t('vehicleProps:value.na');
1411
- }
1412
- },
1413
- wltpFast: {
1414
- title: t('vehicleProps:title.wltpFast'),
1415
- get value() {
1416
- const wltpFast = car.consumption.wltpFast;
1417
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1418
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1419
- return Number.isFinite(wltpFast)
1420
- ? t('vehicleProps:value.consumption', { consumption: wltpFast.toLocaleString(language), unit: translatedUnit })
1421
- : t('vehicleProps:value.na');
1422
- }
1423
- },
1424
- wltpFastGas: {
1425
- title: t('vehicleProps:title.wltpFast'),
1426
- get value() {
1427
- const wltpFast = car.consumption.wltpFast;
1428
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1429
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1430
- return Number.isFinite(wltpFast)
1431
- ? t('vehicleProps:value.consumptionGas', { consumption: wltpFast.toLocaleString(language), unit: translatedUnit })
1432
- : t('vehicleProps:value.na');
1433
- }
1434
- },
1435
- wltpFastPlugin: {
1436
- title: t('vehicleProps:title.wltpFastPlugin'),
1437
- get value() {
1438
- const wltpFast = car.consumption.wltpFast;
1439
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1440
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1441
- return Number.isFinite(wltpFast)
1442
- ? t('vehicleProps:value.consumption', { consumption: wltpFast.toLocaleString(language), unit: translatedUnit })
1443
- : t('vehicleProps:value.na');
1444
- }
1445
- },
1446
- wltpVeryFast: {
1447
- title: t('vehicleProps:title.wltpVeryFast'),
1448
- get value() {
1449
- const wltpVeryFast = car.consumption.wltpVeryFast;
1450
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1451
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1452
- return Number.isFinite(wltpVeryFast)
1453
- ? t('vehicleProps:value.consumption', { consumption: wltpVeryFast.toLocaleString(language), unit: translatedUnit })
1454
- : t('vehicleProps:value.na');
1455
- }
1456
- },
1457
- wltpVeryFastGas: {
1458
- title: t('vehicleProps:title.wltpVeryFast'),
1459
- get value() {
1460
- const wltpVeryFast = car.consumption.wltpVeryFast;
1461
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1462
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1463
- return Number.isFinite(wltpVeryFast)
1464
- ? t('vehicleProps:value.consumptionGas', { consumption: wltpVeryFast.toLocaleString(language), unit: translatedUnit })
1465
- : t('vehicleProps:value.na');
1466
- }
1467
- },
1468
- wltpVeryFastPlugin: {
1469
- title: t('vehicleProps:title.wltpVeryFastPlugin'),
1470
- get value() {
1471
- const wltpVeryFast = car.consumption.wltpVeryFast;
1472
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1473
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1474
- return Number.isFinite(wltpVeryFast)
1475
- ? t('vehicleProps:value.consumption', { consumption: wltpVeryFast.toLocaleString(language), unit: translatedUnit })
1476
- : t('vehicleProps:value.na');
1477
- }
1478
- },
1479
- wltpWeightedPowerCombined: {
1480
- title: t('vehicleProps:title.wltpWeightedPowerCombined'),
1481
- get value() {
1482
- const wltpWeightedPowerCombined = car.consumption.wltpWeightedPowerCombined;
1483
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1484
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1485
- return Number.isFinite(wltpWeightedPowerCombined)
1486
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit })
1487
- : t('vehicleProps:value.na');
1488
- }
1489
- },
1490
- wltpPowerCombined: {
1491
- title: t('vehicleProps:title.wltpPowerCombined'),
1492
- get value() {
1493
- const wltpPowerCombined = car.consumption.wltpPowerCombined;
1494
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1495
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1496
- return Number.isFinite(wltpPowerCombined)
1497
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerCombined.toLocaleString(language), unit: translatedUnit })
1498
- : t('vehicleProps:value.na');
1499
- }
1500
- },
1501
- wltpPowerSlow: {
1502
- title: t('vehicleProps:title.wltpPowerSlow'),
1503
- get value() {
1504
- const wltpPowerSlow = car.consumption.wltpPowerSlow;
1505
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1506
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1507
- return Number.isFinite(wltpPowerSlow)
1508
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerSlow.toLocaleString(language), unit: translatedUnit })
1509
- : t('vehicleProps:value.na');
1510
- }
1511
- },
1512
- wltpPowerMedium: {
1513
- title: t('vehicleProps:title.wltpPowerMedium'),
1514
- get value() {
1515
- const wltpPowerMedium = car.consumption.wltpPowerMedium;
1516
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1517
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1518
- return Number.isFinite(wltpPowerMedium)
1519
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerMedium.toLocaleString(language), unit: translatedUnit })
1520
- : t('vehicleProps:value.na');
1521
- }
1522
- },
1523
- wltpPowerFast: {
1524
- title: t('vehicleProps:title.wltpPowerFast'),
1525
- get value() {
1526
- const wltpPowerFast = car.consumption.wltpPowerFast;
1527
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1528
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1529
- return Number.isFinite(wltpPowerFast)
1530
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerFast.toLocaleString(language), unit: translatedUnit })
1531
- : t('vehicleProps:value.na');
1532
- }
1533
- },
1534
- wltpPowerVeryFast: {
1535
- title: t('vehicleProps:title.wltpPowerVeryFast'),
1536
- get value() {
1537
- const wltpPowerVeryFast = car.consumption.wltpPowerVeryFast;
1538
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1539
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1540
- return Number.isFinite(wltpPowerVeryFast)
1541
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerVeryFast.toLocaleString(language), unit: translatedUnit })
1542
- : t('vehicleProps:value.na');
1543
- }
1544
- },
1545
- wltpPowerCombinedPlugin: {
1546
- title: t('vehicleProps:title.wltpPowerCombined'),
1547
- get value() {
1548
- const wltpPowerCombined = car.consumption.wltpPowerCombined;
1549
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1550
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1551
- return Number.isFinite(wltpPowerCombined)
1552
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerCombined.toLocaleString(language), unit: translatedUnit })
1553
- : t('vehicleProps:value.na');
1554
- }
1555
- },
1556
- wltpPowerSlowPlugin: {
1557
- title: t('vehicleProps:title.wltpPowerSlow'),
1558
- get value() {
1559
- const wltpPowerSlow = car.consumption.wltpPowerSlow;
1560
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1561
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1562
- return Number.isFinite(wltpPowerSlow)
1563
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerSlow.toLocaleString(language), unit: translatedUnit })
1564
- : t('vehicleProps:value.na');
1565
- }
1566
- },
1567
- wltpPowerMediumPlugin: {
1568
- title: t('vehicleProps:title.wltpPowerMedium'),
1569
- get value() {
1570
- const wltpPowerMedium = car.consumption.wltpPowerMedium;
1571
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1572
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1573
- return Number.isFinite(wltpPowerMedium)
1574
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerMedium.toLocaleString(language), unit: translatedUnit })
1575
- : t('vehicleProps:value.na');
1576
- }
1577
- },
1578
- wltpPowerFastPlugin: {
1579
- title: t('vehicleProps:title.wltpPowerFast'),
1580
- get value() {
1581
- const wltpPowerFast = car.consumption.wltpPowerFast;
1582
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1583
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1584
- return Number.isFinite(wltpPowerFast)
1585
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerFast.toLocaleString(language), unit: translatedUnit })
1586
- : t('vehicleProps:value.na');
1587
- }
1588
- },
1589
- wltpPowerVeryFastPlugin: {
1590
- title: t('vehicleProps:title.wltpPowerVeryFast'),
1591
- get value() {
1592
- const wltpPowerVeryFast = car.consumption.wltpPowerVeryFast;
1593
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1594
- const translatedUnit = t(`cbd:${consumptionUnit}`);
1595
- return Number.isFinite(wltpPowerVeryFast)
1596
- ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerVeryFast.toLocaleString(language), unit: translatedUnit })
1597
- : t('vehicleProps:value.na');
1598
- }
1599
- },
1600
- wltpEnergyCosts: {
1601
- title: t('vehicleProps:title.wltpEnergyCosts'),
1602
- get value() {
1603
- const { fuel } = car.consumption;
1604
- const { wltpCombined, wltpPowerCombined, wltpWeightedCombined, wltpWeightedPowerCombined } = car.consumption;
1605
- const { powerPrice, fuelPrice } = car.costModel;
1606
- const powerCost = {
1607
- fuelPrice,
1608
- powerPrice
1609
- }
1610
- const { hybridPlugin } = car.engineData;
1611
- const consumption = {
1612
- wltpCombined, wltpPowerCombined, wltpWeightedCombined, wltpWeightedPowerCombined
1613
- }
1614
- const { getFuelPrice } = financingUtils;
1615
- const fuelCost = getFuelPrice(fuel, consumption, hybridPlugin, powerCost);
1616
- return Number.isFinite(fuelCost)
1617
- ? t('vehicleProps:value.pricePerYear', { price: getFormattedPrice(fuelCost, '$,.2f') })
1618
- : t('vehicleProps:value.na');
1619
- }
1620
- },
1621
- wltpCo2CostsLow: {
1622
- get title() {
1623
- const { co2DefaultCostsLow } = financingUtils;
1624
- return t('vehicleProps:title.wltpCo2LowPrice', { price: co2DefaultCostsLow })
1625
- },
1626
- get value() {
1627
- const wltpCo2 = car.environmentEmissions.wltpCo2;
1628
-
1629
- const { getCo2Price } = financingUtils;
1630
- const { co2PriceLow } = getCo2Price(wltpCo2);
1631
- return Number.isFinite(co2PriceLow)
1632
- ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceLow, '$,.2f') })
1633
- : t('vehicleProps:value.na');
1634
- },
1635
- get valueDescription() {
1636
- const wltpCo2 = car.environmentEmissions.wltpCo2;
1637
-
1638
- const { getCo2Price } = financingUtils;
1639
- const { co2PriceLow } = getCo2Price(wltpCo2);
1640
- return Number.isFinite(co2PriceLow) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1641
- }
1642
- },
1643
- wltpCo2CostsMiddle: {
1644
- get title() {
1645
- const { co2DefaultCostsMedium } = financingUtils;
1646
- return t('vehicleProps:title.wltpCo2MidPrice', { price: co2DefaultCostsMedium })
1647
- },
1648
- get value() {
1649
- const wltpCo2 = car.environmentEmissions.wltpCo2;
1650
-
1651
- const { getCo2Price } = financingUtils;
1652
- const { co2PriceMedium } = getCo2Price(wltpCo2);
1653
- return Number.isFinite(co2PriceMedium)
1654
- ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceMedium, '$,.2f') })
1655
- : t('vehicleProps:value.na');
1656
- },
1657
- get valueDescription() {
1658
- const wltpCo2 = car.environmentEmissions.wltpCo2;
1659
-
1660
- const { getCo2Price } = financingUtils;
1661
- const { co2PriceMedium } = getCo2Price(wltpCo2);
1662
- return Number.isFinite(co2PriceMedium) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1663
- }
1664
- },
1665
- wltpCo2CostsHigh: {
1666
- get title() {
1667
- const { co2DefaultCostsHigh } = financingUtils;
1668
- return t('vehicleProps:title.wltpCo2HighPrice', { price: co2DefaultCostsHigh })
1669
- },
1670
- get value() {
1671
- const wltpCo2 = car.environmentEmissions.wltpCo2;
1672
-
1673
- const { getCo2Price } = financingUtils;
1674
- const { co2PriceHigh } = getCo2Price(wltpCo2);
1675
- return Number.isFinite(co2PriceHigh)
1676
- ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceHigh, '$,.2f') })
1677
- : t('vehicleProps:value.na');
1678
- },
1679
- get valueDescription() {
1680
- const wltpCo2 = car.environmentEmissions.wltpCo2;
1681
-
1682
- const { getCo2Price } = financingUtils;
1683
- const { co2PriceHigh } = getCo2Price(wltpCo2);
1684
- return Number.isFinite(co2PriceHigh) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1685
- }
1686
- },
1687
- powerPrice: {
1688
- title: t('vehicleProps:title.powerPrice'),
1689
- get value() {
1690
- const fuel = car.consumption.fuel;
1691
- const { hybridPlugin } = car.engineData;
1692
-
1693
- const { getBaseFuelPrice } = financingUtils;
1694
-
1695
- const basePowerPrice = getBaseFuelPrice(fuel, hybridPlugin).powerPrice;
1696
- const powerPrice = car.costModel.powerPrice ? car.costModel.powerPrice : basePowerPrice;
1697
-
1698
- return Number.isFinite(powerPrice)
1699
- ? t('vehicleProps:value.powerPrice', { price: getFormattedPrice(powerPrice, '$,.2f') })
1700
- : t('vehicleProps:value.na');
1701
- }
1702
- },
1703
- fuelPrice: {
1704
- title: t('vehicleProps:title.fuelPrice'),
1705
- get value() {
1706
- const fuel = car.consumption.fuel;
1707
- const { hybridPlugin } = car.engineData;
1708
-
1709
- const { getBaseFuelPrice } = financingUtils;
1710
-
1711
- const baseFuelPrice = getBaseFuelPrice(fuel, hybridPlugin) ? getBaseFuelPrice(fuel, hybridPlugin).fuelPrice : null;
1712
-
1713
- const fuelPrice = car.costModel.fuelPrice ? car.costModel.fuelPrice : baseFuelPrice;
1714
- return Number.isFinite(fuelPrice)
1715
- ? t('vehicleProps:value.fuelPrice', { price: getFormattedPrice(fuelPrice, '$,.2f') })
1716
- : t('vehicleProps:value.na');
1717
- }
1718
- },
1719
- consumptionPriceYear: {
1720
- title: t('vehicleProps:title.consumptionPriceYear'),
1721
- get value() {
1722
- const { consumptionPriceYear } = car.costModel;
1723
- return Number.isFinite(consumptionPriceYear)
1724
- ? consumptionPriceYear
1725
- : t('vehicleProps:value.na');
1726
- }
1727
- },
1728
- wltpCostModelTax: {
1729
- title: t('vehicleProps:title.wltpVehicleTax'),
1730
- get value() {
1731
- const cubicCapacity = car.engineData.cubicCapacity;
1732
- const fuel = car.consumption.fuel;
1733
- const wltpCo2 = car.environmentEmissions.wltpCo2;
1734
- const { getVehicleTax } = financingUtils;
1735
- const tax = car.costModel.tax ? car.costModel.tax : getVehicleTax(fuel, cubicCapacity, wltpCo2, firstRegistration);
1736
- return Number.isFinite(tax)
1737
- ? t('vehicleProps:value.pricePerYear', { price: getFormattedPrice(tax, '$,.2f') })
1738
- : t('vehicleProps:value.na');
1739
- }
1740
- }
1741
-
1742
- };
1743
- return props;
1744
- };
1745
-
1746
- export default getDecoratedProps;
1
+ import * as React from 'react';
2
+ import moment from 'moment';
3
+
4
+ import Icon from '../compat/IconContainer/IconContainer';
5
+ import CO2Efficiency from '../compat/Co2Widget/CO2Efficiency';
6
+ import { formatTimestamp } from '../utils/DateUtils';
7
+ import { formatMileage } from '../utils/CommonUtils';
8
+ import { EMISSION_STICKERS_ICONS, WP_EMISSION_STICKERS_ICONS } from '../constants/Search';
9
+ import { DELIVERY_PERIODS_EXTRA } from '../constants';
10
+ import { IDecoratedProp, ICar, IFinancingUtils } from '../types/types';
11
+ import { getFormattedPrice } from '../utils/CommonUtils';
12
+
13
+ const formatDeliveryPeriod = (t: (key: string, options?: object) => string, deliveryPeriod: string) => {
14
+ const count: number = +DELIVERY_PERIODS_EXTRA.find((period: any) => period.value === deliveryPeriod).label;
15
+ // months until delivery date unrounded (float)
16
+ const monthsTo: number = moment.utc().diff(moment.utc().subtract(count, 'd'), 'M', true);
17
+ return Math.round(monthsTo) > 1
18
+ ? t('vehicleProps:value.deliveryPeriodMonths', { count: Math.round(monthsTo) })
19
+ : t('vehicleProps:value.deliveryPeriodDays', { count });
20
+ };
21
+
22
+ const isPropDefined = (prop: any) => {
23
+ const type = typeof prop;
24
+ if (type === 'string') {
25
+ return prop.indexOf('other') === -1
26
+ && prop.indexOf('unknown') === -1;
27
+ }
28
+ return !(prop === undefined || prop === null) && type !== 'undefined';
29
+ };
30
+
31
+ const isCheckedBatteryTime = (prop: any, t: (key: string, options?: object) => string) => {
32
+ switch (prop) {
33
+ case 'selector_batteryCharchingDurationMinutes':
34
+ return 'min';
35
+ break;
36
+ case 'selector_batteryCharchingDurationHours':
37
+ return 'h';
38
+ break;
39
+ default:
40
+ return t('vehicleProps:value.na');
41
+ }
42
+ };
43
+
44
+ // getPowerLabel MOVED to @bytebrand/fe-ui-core-autobahn (pure logic, shared by
45
+ // fe-main/fe-landing/fe-wp-widgets). Re-exported here so this module's public
46
+ // symbol set — and the `@bytebrand/fe-ui-core/utils` barrel — stay unchanged.
47
+ export { getPowerLabel } from '../utils/power';
48
+ const wrapValue = (value:string): React.ReactNode => {
49
+ const regex = /-?\d+(\,\d+)?/; // match any digit
50
+ const matches = value.match(regex); // get an array of all digits found
51
+
52
+ if (matches && matches.length > 0) { // If at least one number is found in the input string
53
+ const index = value.indexOf(matches[0]) + matches[0].length;
54
+ const beforeText = value.slice(0, index);
55
+ const afterText = value.slice(index);
56
+
57
+ return (
58
+ <>
59
+ {beforeText}
60
+ <span className='smallText'>{afterText}</span>
61
+ </>
62
+ ); // Return a JSX element with a span wrapper around the text after the number
63
+ }
64
+ return <>{value}</>; // If no numbers are found in the input string, return the original string without any modification
65
+ };
66
+
67
+ const getDecoratedProps = (
68
+ car: ICar, // @TODO should have a proper interface
69
+ t: (key: string, options?: object) => string,
70
+ language: string = 'en',
71
+ simplifiedLabels: boolean = false, // shortened labels for repsonsive layout (see 'power'),
72
+ financingUtils?: IFinancingUtils
73
+ ): IDecoratedProp => {
74
+ const {
75
+ offer = {},
76
+ // countryName,
77
+ mainData: {
78
+ firstRegistration = '',
79
+ mileage = '',
80
+ numberOfPreviousOwners = '',
81
+ doors = '',
82
+ usageType = '',
83
+ countryVersion = '',
84
+ condition = '',
85
+ damaged = '',
86
+ category = '',
87
+ seats = '',
88
+ nonSmokerVehicle = '',
89
+ make = '',
90
+ model = ''
91
+ } = {}
92
+ } = car;
93
+ const props: any = {
94
+ makeModel: {
95
+ title: t('vehicleProps:title.makeModel'),
96
+ get value() { return `${make} ${model}`; }
97
+ },
98
+ mileage: {
99
+ title: t('vehicleProps:title.mileage'),
100
+ icon: 'speed',
101
+ get value() {
102
+ return Number.isFinite(parseInt(mileage, 10))
103
+ ? t('vehicleProps:value.mileage', { mileage: formatMileage(mileage) })
104
+ : t('vehicleProps:value.na');
105
+ }
106
+ },
107
+
108
+ firstRegistration: {
109
+ title: t('vehicleProps:title.firstRegistration'),
110
+ icon: 'date',
111
+ get value() {
112
+ return Number.isFinite(firstRegistration)
113
+ ? formatTimestamp({ timestamp: firstRegistration, format: 'MM/YYYY' })
114
+ : t('vehicleProps:value.na');
115
+ }
116
+ },
117
+
118
+ numberOfPreviousOwners: {
119
+ title: t('vehicleProps:title.numberOfPreviousOwners'),
120
+ icon: 'owner',
121
+ get value() {
122
+ return Number.isFinite(numberOfPreviousOwners)
123
+ ? t('vehicleProps:value.vehicleOwners', { count: numberOfPreviousOwners })
124
+ : t('vehicleProps:value.na');
125
+ }
126
+ },
127
+
128
+ doorsOnly: {
129
+ icon: 'door',
130
+ get value() {
131
+ if (doors > 0) {
132
+ return t('vehicleProps:value.doorsOnly', { doors });
133
+ }
134
+
135
+ return t('vehicleProps:value.na');
136
+ }
137
+ },
138
+
139
+ usageType: {
140
+ icon: 'new',
141
+ get value() {
142
+ if (condition === 'selector_condition_new') return t('vehicleProps:value.newCar');
143
+ return isPropDefined(usageType) ? t(`cbd:${usageType}`) : t('cbd:selector_condition_used');
144
+ }
145
+ },
146
+
147
+ gearbox: {
148
+ get icon() {
149
+ const gearbox = car.driveSuspension.gearbox;
150
+ return isPropDefined(gearbox) ? car.driveSuspension.gearbox : 'selector_gearbox_manualShift';
151
+ },
152
+ get value() {
153
+ const gearbox = car.driveSuspension.gearbox;
154
+ return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
155
+ }
156
+ },
157
+
158
+ power: {
159
+ title: t('vehicleProps:title.power'),
160
+ icon: 'ps',
161
+ get value() {
162
+ const { powerKW, powerPS } = car.engineData;
163
+
164
+ if (Number.isFinite(powerKW) && Number.isFinite(powerPS)) {
165
+ return simplifiedLabels
166
+ ? t('vehicleProps:value.powerPS', { powerPS })
167
+ : t('vehicleProps:value.power', { powerKW, powerPS });
168
+ }
169
+
170
+ return t('vehicleProps:value.na');
171
+ }
172
+ },
173
+
174
+ powerAlternateView: {
175
+ title: t('vehicleProps:title.power'),
176
+ icon: 'kw',
177
+ get value() {
178
+ const { powerKW, powerPS } = car.engineData;
179
+ return Number.isFinite(powerKW) && Number.isFinite(powerPS)
180
+ ? t('vehicleProps:value.powerAlternateView', { powerKW, powerPS })
181
+ : t('vehicleProps:value.na');
182
+ }
183
+ },
184
+
185
+ fuel: {
186
+ title: t('vehicleProps:title.fuel'),
187
+ get icon() { return car.consumption.fuel; },
188
+ get value() {
189
+ const fuel = car.consumption.fuel;
190
+ return isPropDefined(fuel) ? t(`cbd:${fuel}`) : t('vehicleProps:value.na');
191
+ }
192
+ },
193
+
194
+ accidentDamaged: {
195
+ title: t('cbd:mainData_accidentDamaged'),
196
+ icon: 'wrench',
197
+ get value() {
198
+ return damaged ? t('vehicleProps:value.damaged') : t('vehicleProps:value.accidentFree');
199
+ }
200
+ },
201
+
202
+ co2: {
203
+ icon: 'co2',
204
+ get value() {
205
+ const co2 = car.environmentEmissions.co2;
206
+ return Number.isFinite(co2)
207
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
208
+ : t('vehicleProps:value.na');
209
+ }
210
+ },
211
+
212
+ cylinders: {
213
+ title: t('vehicleProps:title.cylinders'),
214
+ get value() {
215
+ const { engineLocation } = car.engineData;
216
+ const cylinders = parseInt(car.engineData.cylinders, 10);
217
+ return Number.isFinite(cylinders)
218
+ ? (engineLocation ? `${cylinders} / ${t(`cbd:${engineLocation}`)}` : cylinders)
219
+ : t('vehicleProps:value.na');
220
+ }
221
+ },
222
+
223
+ plugIn: {
224
+ title: 'Plug-In',
225
+ get value() {
226
+ const { hybridPlugin } = car.engineData;
227
+ return hybridPlugin ? t(`cbd:selector_hybridPlugin_yes`) : t('cbd:selector_hybridPlugin_no');
228
+ }
229
+ },
230
+
231
+ cubicCapacity: {
232
+ title: t('vehicleProps:title.cubicCapacity'),
233
+ get value() {
234
+ const cubicCapacity = car.engineData.cubicCapacity;
235
+ return Number.isFinite(cubicCapacity)
236
+ ? t('vehicleProps:value.cubicCapacity', { cubicCapacity: cubicCapacity.toLocaleString(language) })
237
+ : t('vehicleProps:value.na');
238
+ }
239
+ },
240
+
241
+ torque: {
242
+ title: t('vehicleProps:title.torque'),
243
+ get value() {
244
+ const torque = car.engineData.torque;
245
+ return torque
246
+ ? t('vehicleProps:value.torque', { torque })
247
+ : t('vehicleProps:value.na');
248
+ }
249
+ },
250
+
251
+ acceleration: {
252
+ title: t('vehicleProps:title.acceleration'),
253
+ get value() {
254
+ const acceleration = car.engineData.acceleration100;
255
+ return isPropDefined(acceleration)
256
+ ? (t('vehicleProps:value.acceleration', { seconds: acceleration }))
257
+ : t('vehicleProps:value.na');
258
+ }
259
+ },
260
+
261
+ topSpeed: {
262
+ title: t('vehicleProps:title.topSpeed'),
263
+ get value() {
264
+ const topSpeed = car.engineData.highSpeed;
265
+ return isPropDefined(topSpeed)
266
+ ? (t('vehicleProps:value.topSpeed', { mileage: topSpeed }))
267
+ : t('vehicleProps:value.na');
268
+ }
269
+ },
270
+
271
+ transmission: {
272
+ title: t('vehicleProps:title.transmission'),
273
+ get value() {
274
+ const gearbox = car.driveSuspension.gearbox;
275
+ return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
276
+ }
277
+ },
278
+
279
+ driveType: {
280
+ title: t('vehicleProps:title.driveType'),
281
+ get icon() {
282
+ const driveType = car.driveSuspension.driveType;
283
+ return isPropDefined(driveType) ? car.driveSuspension.driveType : 'selector_driveType_frontWheelDrive';
284
+ },
285
+ get value() {
286
+ const driveType = car.driveSuspension.driveType;
287
+ return isPropDefined(driveType) ? t(`cbd:${driveType}`) : t('vehicleProps:value.na');
288
+ }
289
+ },
290
+
291
+ fuelCapacity: {
292
+ title: t('vehicleProps:title.fuelCapacity'),
293
+ get value() {
294
+ const fuelCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.fuelCapacity;
295
+ return Number.isFinite(fuelCapacity)
296
+ ? t('vehicleProps:value.fuelCapacity', { capacity: fuelCapacity.toLocaleString(language) })
297
+ : t('vehicleProps:value.na');
298
+ }
299
+ },
300
+
301
+ batteryCapacity: {
302
+ title: t('vehicleProps:title.batteryCapacityTitle'),
303
+ get value() {
304
+ const batteryCapacity = car.battery && car.battery.batteryCapacity;
305
+ return batteryCapacity && Number.isFinite(batteryCapacity)
306
+ ? t('vehicleProps:value.batteryCapacity', { batteryCapacity: batteryCapacity.toLocaleString(language) })
307
+ : t('vehicleProps:value.na');
308
+ }
309
+ },
310
+
311
+ chargingDuration230V: {
312
+ title: t('vehicleProps:title.chargingDuration230V'),
313
+ get value() {
314
+ const batteryChargingDuration230VSelect = car.battery && car.battery.batteryChargingDuration230VSelect;
315
+ const batteryChargingDuration230VHour = car.battery && car.battery.batteryChargingDuration230VHour;
316
+ const batteryCharchingDuration230VMinutesHours = car.battery && car.battery.batteryCharchingDuration230VMinutesHours;
317
+
318
+ return batteryChargingDuration230VSelect
319
+ ? `${batteryChargingDuration230VHour ? `${batteryChargingDuration230VHour} ${isCheckedBatteryTime(batteryCharchingDuration230VMinutesHours, t)}` : ''} ${batteryChargingDuration230VSelect}`
320
+ : t('vehicleProps:value.na');
321
+ }
322
+ },
323
+ chargingDurationMaxSpeed: {
324
+ title: t('vehicleProps:title.chargingDurationMaxSpeed'),
325
+ get value() {
326
+ const batteryChargingDurationMaxSelect = car.battery && car.battery.batteryChargingDurationMaxSelect;
327
+ const batteryChargingDurationMaxHour = car.battery && car.battery.batteryChargingDurationMaxHour;
328
+ const batteryCharchingDurationMaxSelectMinutesHours = car.battery && car.battery.batteryCharchingDurationMaxSelectMinutesHours;
329
+
330
+ return batteryChargingDurationMaxSelect
331
+ ? `${batteryChargingDurationMaxHour ? `${batteryChargingDurationMaxHour} ${isCheckedBatteryTime(batteryCharchingDurationMaxSelectMinutesHours, t)}` : ''} ${batteryChargingDurationMaxSelect}`
332
+ : t('vehicleProps:value.na');
333
+ }
334
+ },
335
+ batteryChargerType: {
336
+ title: t('vehicleProps:title.batteryChargerType'),
337
+ get value() {
338
+ const batteryChargerType = car.battery && car.battery.batteryChargerType;
339
+
340
+ return isPropDefined(batteryChargerType)
341
+ ? batteryChargerType.map((item: any) => t(`cbd:${item}`)).join('\n')
342
+ : t('vehicleProps:value.na');
343
+ }
344
+ },
345
+ hsn: {
346
+ title: 'HSN',
347
+ get value() {
348
+ const hsn = car.metaData.hsn;
349
+ return isPropDefined(hsn) ? hsn : t('vehicleProps:value.na');
350
+ }
351
+ },
352
+
353
+ tsn: {
354
+ title: 'TSN',
355
+ get value() {
356
+ const tsn = car.metaData.tsn;
357
+ return isPropDefined(tsn) ? tsn : t('vehicleProps:value.na');
358
+ }
359
+ },
360
+
361
+ category: {
362
+ title: t('vehicleProps:title.category'),
363
+ get value() {
364
+ return isPropDefined(category) ? t(`cbd:${category}`) : t('vehicleProps:value.na');
365
+ }
366
+ },
367
+
368
+ length: {
369
+ title: t('vehicleProps:title.length'),
370
+ get value() {
371
+ const length = car.sizeVolumeWeight && car.sizeVolumeWeight.length;
372
+ return Number.isFinite(length)
373
+ ? t('vehicleProps:value.length', { size: length.toLocaleString(language) })
374
+ : t('vehicleProps:value.na');
375
+ }
376
+ },
377
+
378
+ width: {
379
+ title: t('vehicleProps:title.width'),
380
+ get value() {
381
+ const width = car.sizeVolumeWeight && car.sizeVolumeWeight.width;
382
+ return Number.isFinite(width)
383
+ ? t('vehicleProps:value.width', { size: width.toLocaleString(language) })
384
+ : t('vehicleProps:value.na');
385
+ }
386
+ },
387
+
388
+ height: {
389
+ title: t('vehicleProps:title.height'),
390
+ get value() {
391
+ const height = car.sizeVolumeWeight && car.sizeVolumeWeight.height;
392
+ return Number.isFinite(height)
393
+ ? t('vehicleProps:value.height', { size: height.toLocaleString(language) })
394
+ : t('vehicleProps:value.na');
395
+ }
396
+ },
397
+
398
+ base: {
399
+ title: t('vehicleProps:title.base'),
400
+ get value() {
401
+ const wheelBase = car.driveSuspension.wheelBase;
402
+ return Number.isFinite(wheelBase)
403
+ ? t('vehicleProps:value.base', { size: wheelBase.toLocaleString(language) })
404
+ : t('vehicleProps:value.na');
405
+ }
406
+ },
407
+
408
+ capacityLoad: {
409
+ title: t('vehicleProps:title.loadingVolume'),
410
+ get value() {
411
+ const completeCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.completeCapacity;
412
+ return Number.isFinite(completeCapacity)
413
+ ? t('vehicleProps:value.capacityLoad', { capacity: completeCapacity.toLocaleString(language) })
414
+ : t('vehicleProps:value.na');
415
+ }
416
+ },
417
+
418
+ bootCapacity: {
419
+ title: t('vehicleProps:title.bootCapacity'),
420
+ get value() {
421
+ const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
422
+ return Number.isFinite(cargoCapacity)
423
+ ? t('vehicleProps:value.bootCapacity', { capacity: cargoCapacity.toLocaleString(language) })
424
+ : t('vehicleProps:value.na');
425
+ }
426
+ },
427
+
428
+ doors: {
429
+ title: t('vehicleProps:title.doors'),
430
+ get value() { return doors > 0 ? doors : t('vehicleProps:value.na'); }
431
+ },
432
+
433
+ seats: {
434
+ title: t('vehicleProps:title.seats'),
435
+ get value() { return seats > 0 ? seats : t('vehicleProps:value.na'); }
436
+ },
437
+
438
+ tare: {
439
+ title: t('vehicleProps:title.tare'),
440
+ get value() {
441
+ const emptyWeight = car.sizeVolumeWeight && car.sizeVolumeWeight.emptyWeight;
442
+ return Number.isFinite(emptyWeight)
443
+ ? t('vehicleProps:value.tareWeight', { weight: (emptyWeight).toLocaleString(language) })
444
+ : t('vehicleProps:value.na');
445
+ }
446
+ },
447
+
448
+ maximumWeight: {
449
+ title: t('vehicleProps:title.maximumWeight'),
450
+ get value() {
451
+ const maxWeight = car.sizeVolumeWeight && car.sizeVolumeWeight.maxWeight;
452
+ return Number.isFinite(maxWeight)
453
+ ? t('vehicleProps:value.maximumWeightCapacity', { capacity: maxWeight.toLocaleString(language) })
454
+ : t('vehicleProps:value.na');
455
+ }
456
+ },
457
+
458
+ trailerWeightBraked: {
459
+ title: t('vehicleProps:title.trailerLoadBraked'),
460
+ get value() {
461
+ const trailerWeightBraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightBraked;
462
+ return Number.isFinite(trailerWeightBraked)
463
+ ? t('vehicleProps:value.weight', { weight: trailerWeightBraked.toLocaleString(language) })
464
+ : t('vehicleProps:value.na');
465
+ }
466
+ },
467
+
468
+ trailerWeightUnbraked: {
469
+ title: t('vehicleProps:title.trailerLoadUnbraked'),
470
+ get value() {
471
+ const trailerWeightUnbraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightUnbraked;
472
+ return Number.isFinite(trailerWeightUnbraked)
473
+ ? t('vehicleProps:value.weight', { weight: trailerWeightUnbraked.toLocaleString(language) })
474
+ : t('vehicleProps:value.na');
475
+ }
476
+ },
477
+
478
+ consumptionInner: {
479
+ icon: 'fuelConsumption',
480
+ title: t('vehicleProps:title.consumptionInner'),
481
+ get value() {
482
+ const consumptionInner = car.consumption.consumptionInner;
483
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
484
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
485
+ return Number.isFinite(consumptionInner)
486
+ ? t('vehicleProps:value.consumption', { consumption: consumptionInner.toLocaleString(language), unit: translatedUnit })
487
+ : t('vehicleProps:value.na');
488
+ }
489
+ },
490
+
491
+ consumptionPowerInner: {
492
+ icon: 'fuelConsumption',
493
+ title: t('vehicleProps:title.consumptionPowerInner'),
494
+ get value() {
495
+ const consumptionPowerInner = car.consumption.consumptionInner;
496
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
497
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
498
+ return Number.isFinite(consumptionPowerInner)
499
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
500
+ : t('vehicleProps:value.na');
501
+ }
502
+ },
503
+
504
+ consumptionPowerHybridInner: {
505
+ icon: 'fuelConsumption',
506
+ title: t('vehicleProps:title.consumptionPowerInner'),
507
+ get value() {
508
+ const consumptionPowerInner = car.consumption.consumptionPowerInner;
509
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
510
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
511
+ return Number.isFinite(consumptionPowerInner)
512
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
513
+ : t('vehicleProps:value.na');
514
+ }
515
+ },
516
+
517
+ consumptionHydrogenInner: {
518
+ icon: 'fuelConsumption',
519
+ title: t('vehicleProps:title.consumptionHydrogenInner'),
520
+ get value() {
521
+ const consumptionHydrogenInner = car.consumption.consumptionInner;
522
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
523
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
524
+ return Number.isFinite(consumptionHydrogenInner)
525
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenInner.toLocaleString(language), unit: translatedUnit })
526
+ : t('vehicleProps:value.na');
527
+ }
528
+ },
529
+ consumptionGasInner: {
530
+ icon: 'fuelConsumption',
531
+ title: t('vehicleProps:title.consumptionGasInner'),
532
+ get value() {
533
+ const consumptionGasInner = car.consumption.consumptionInner;
534
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
535
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
536
+ return Number.isFinite(consumptionGasInner)
537
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasInner.toLocaleString(language), unit: translatedUnit })
538
+ : t('vehicleProps:value.na');
539
+ }
540
+ },
541
+
542
+ consumptionOuter: {
543
+ icon: 'fuelConsumption',
544
+ title: t('vehicleProps:title.consumptionOuter'),
545
+ get value() {
546
+ const consumptionOuter = car.consumption.consumptionOuter;
547
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
548
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
549
+ return Number.isFinite(consumptionOuter)
550
+ ? t('vehicleProps:value.consumption', { consumption: consumptionOuter.toLocaleString(language), unit: translatedUnit })
551
+ : t('vehicleProps:value.na');
552
+ }
553
+ },
554
+
555
+ consumptionPowerOuter: {
556
+ icon: 'fuelConsumption',
557
+ title: t('vehicleProps:title.consumptionPowerOuter'),
558
+ get value() {
559
+ const consumptionPowerOuter = car.consumption.consumptionOuter;
560
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
561
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
562
+ return Number.isFinite(consumptionPowerOuter)
563
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
564
+ : t('vehicleProps:value.na');
565
+ }
566
+ },
567
+
568
+ consumptionPowerHybridOuter: {
569
+ icon: 'fuelConsumption',
570
+ title: t('vehicleProps:title.consumptionPowerOuter'),
571
+ get value() {
572
+ const consumptionPowerOuter = car.consumption.consumptionPowerOuter;
573
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
574
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
575
+ return Number.isFinite(consumptionPowerOuter)
576
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
577
+ : t('vehicleProps:value.na');
578
+ }
579
+ },
580
+
581
+ consumptionHydrogenOuter: {
582
+ icon: 'fuelConsumption',
583
+ title: t('vehicleProps:title.consumptionHydrogenOuter'),
584
+ get value() {
585
+ const consumptionHydrogenOuter = car.consumption.consumptionOuter;
586
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
587
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
588
+ return Number.isFinite(consumptionHydrogenOuter)
589
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenOuter.toLocaleString(language), unit: translatedUnit })
590
+ : t('vehicleProps:value.na');
591
+ }
592
+ },
593
+
594
+ consumptionGasOuter: {
595
+ icon: 'fuelConsumption',
596
+ title: t('vehicleProps:title.consumptionGasOuter'),
597
+ get value() {
598
+ const consumptionGasOuter = car.consumption.consumptionOuter;
599
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
600
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
601
+ return Number.isFinite(consumptionGasOuter)
602
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasOuter.toLocaleString(language), unit: translatedUnit })
603
+ : t('vehicleProps:value.na');
604
+ }
605
+ },
606
+
607
+ consumptionCombined: {
608
+ icon: 'fuelConsumption',
609
+ title: t('vehicleProps:title.сonsumptionCombined'),
610
+ get value() {
611
+ const consumptionCombined = car.consumption.consumptionCombined;
612
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
613
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
614
+ return Number.isFinite(consumptionCombined)
615
+ ? t('vehicleProps:value.consumption', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
616
+ : t('vehicleProps:value.na');
617
+ }
618
+ },
619
+
620
+ consumptionPowerCombined: {
621
+ icon: 'fuelConsumption',
622
+ title: t('vehicleProps:title.consumptionPowerCombined'),
623
+ get value() {
624
+ const consumptionPowerCombined = car.consumption.consumptionCombined;
625
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
626
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
627
+ return Number.isFinite(consumptionPowerCombined)
628
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
629
+ : t('vehicleProps:value.na');
630
+ }
631
+ },
632
+
633
+ consumptionPowerHybridCombined: {
634
+ icon: 'fuelConsumption',
635
+ title: t('vehicleProps:title.consumptionPowerCombined'),
636
+ get value() {
637
+ const consumptionPowerCombined = car.consumption.consumptionPowerCombined;
638
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
639
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
640
+ return Number.isFinite(consumptionPowerCombined)
641
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
642
+ : t('vehicleProps:value.na');
643
+ }
644
+ },
645
+
646
+ consumptionHydrogenCombined: {
647
+ icon: 'fuelConsumption',
648
+ title: t('vehicleProps:title.consumptionHydrogenCombined'),
649
+ get value() {
650
+ const consumptionHydrogenCombined = car.consumption.consumptionCombined;
651
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
652
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
653
+ return Number.isFinite(consumptionHydrogenCombined)
654
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
655
+ : t('vehicleProps:value.na');
656
+ }
657
+ },
658
+
659
+ consumptionGasCombined: {
660
+ icon: 'fuelConsumption',
661
+ title: t('vehicleProps:title.consumptionGasCombined'),
662
+ get value() {
663
+ const consumptionGasCombined = car.consumption.consumptionCombined;
664
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
665
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
666
+ return Number.isFinite(consumptionGasCombined)
667
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
668
+ : t('vehicleProps:value.na');
669
+ }
670
+ },
671
+
672
+ consumptionCombinedAlternateView: {
673
+ icon: 'fuelConsumption',
674
+ get value() {
675
+ const consumptionCombined = car.consumption.consumptionCombined;
676
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
677
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
678
+ const wltpConsumptionCombined = car.consumption.wltpCombined;
679
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
680
+ const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
681
+
682
+ const co2 = car.environmentEmissions.co2;
683
+
684
+ const wltpConsumptionValue = Number.isFinite(wltpConsumptionCombined)
685
+ ? t('vehicleProps:value.consumptionCombined', { consumption: wltpConsumptionCombined.toLocaleString(language), unit: translatedUnit })
686
+ : null;
687
+
688
+ const wltpCo2Value = Number.isFinite(wltpCo2)
689
+ ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
690
+ : null;
691
+
692
+ const consumptionValue = Number.isFinite(consumptionCombined)
693
+ ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
694
+ : t('vehicleProps:value.na');
695
+
696
+ const co2Value = Number.isFinite(co2)
697
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
698
+ : t('vehicleProps:value.na');
699
+
700
+ const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
701
+ ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
702
+ : null;
703
+
704
+ if (wltpConsumptionValue && wltpCo2Value) {
705
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
706
+ }
707
+
708
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
709
+ }
710
+ },
711
+ consumptionPowerCombinedAlternateView: {
712
+ icon: 'fuelConsumption',
713
+ title: t('vehicleProps:title.consumptionPowerCombined'),
714
+ get value() {
715
+ const consumptionPowerCombined = car.consumption.consumptionCombined;
716
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
717
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
718
+ const co2 = car.environmentEmissions.co2;
719
+ const wltpConsumptionPowerCombined = car.consumption.wltpPowerCombined;
720
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
721
+ const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
722
+
723
+ const wltpConsumptionValue = Number.isFinite(wltpConsumptionPowerCombined)
724
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
725
+ : null;
726
+
727
+ const wltpCo2Value = Number.isFinite(wltpCo2)
728
+ ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
729
+ : null;
730
+
731
+ const consumptionValue = Number.isFinite(consumptionPowerCombined)
732
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
733
+ : t('vehicleProps:value.na');
734
+
735
+ const co2Value = Number.isFinite(co2)
736
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
737
+ : t('vehicleProps:value.na');
738
+
739
+ const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
740
+ ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
741
+ : null;
742
+
743
+ if (wltpConsumptionValue && wltpCo2Value) {
744
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
745
+ }
746
+
747
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
748
+ }
749
+ },
750
+ consumptionHydrogenCombinedAlternateView: {
751
+ icon: 'fuelConsumption',
752
+ title: t('vehicleProps:title.consumptionHydrogenCombined'),
753
+ get value() {
754
+ const consumptionHydrogenCombined = car.consumption.consumptionCombined;
755
+ const wltpConsumptionCombined = car.consumption.wltpCombined;
756
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
757
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
758
+ const co2 = car.environmentEmissions.co2;
759
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
760
+ const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
761
+
762
+ const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
763
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
764
+ : t('vehicleProps:value.na');
765
+
766
+ const wltpConsumptionValue = Number.isFinite(wltpConsumptionCombined)
767
+ ? t('vehicleProps:value.consumptionGas', { consumption: wltpConsumptionCombined.toLocaleString(language), unit: translatedUnit })
768
+ : null;
769
+
770
+ const co2Value = Number.isFinite(co2)
771
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
772
+ : t('vehicleProps:value.na');
773
+
774
+ const wltpCo2Value = Number.isFinite(wltpCo2)
775
+ ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
776
+ : null;
777
+
778
+ const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
779
+ ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
780
+ : null;
781
+
782
+ if (wltpConsumptionValue && wltpCo2Value) {
783
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
784
+ }
785
+
786
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
787
+ }
788
+ },
789
+ consumptionGasCombinedAlternateView: {
790
+ icon: 'fuelConsumption',
791
+ title: t('vehicleProps:title.consumptionGasCombined'),
792
+ get value() {
793
+ const consumptionGasCombined = car.consumption.consumptionCombined;
794
+ const wltpConsumptionCombined = car.consumption.wltpCombined;
795
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
796
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
797
+
798
+ const co2 = car.environmentEmissions.co2;
799
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
800
+ const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
801
+
802
+ const consumptionValue = Number.isFinite(consumptionGasCombined)
803
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
804
+ : t('vehicleProps:value.na');
805
+
806
+ const co2Value = Number.isFinite(co2)
807
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
808
+ : t('vehicleProps:value.na');
809
+
810
+ const wltpConsumptionValue = Number.isFinite(wltpConsumptionCombined)
811
+ ? t('vehicleProps:value.consumptionGas', { consumption: wltpConsumptionCombined.toLocaleString(language), unit: translatedUnit })
812
+ : null;
813
+
814
+ const wltpCo2Value = Number.isFinite(wltpCo2)
815
+ ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
816
+ : null;
817
+
818
+ const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
819
+ ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
820
+ : null;
821
+
822
+ if (wltpConsumptionValue && wltpCo2Value) {
823
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
824
+ }
825
+
826
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
827
+ }
828
+ },
829
+
830
+ consumptionCombinedHybridAlternateView: {
831
+ icon: 'fuelConsumption',
832
+ get value() {
833
+ const consumptionCombined = +car.consumption.consumptionCombined;
834
+ const consumptionPowerCombined = +car.consumption.consumptionPowerCombined;
835
+ // const wltpPowerCombined = car.consumption.wltpPowerCombined || car.consumption.wltpWeightedPowerCombined;
836
+ const wltpCombined = car.consumption.wltpCombined;
837
+ const wltpWeightedCombined = car.consumption.wltpWeightedCombined;
838
+ const wltpWeightedPowerCombined = car.consumption.wltpWeightedPowerCombined;
839
+
840
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
841
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
842
+
843
+ const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
844
+ // const wltpConsumptionPowerCombinedContent = wltpPowerCombined
845
+ // ? t('vehicleProps:value.consumptionPowerCombined', { consumption: wltpPowerCombined.toLocaleString(language), unit: translatedUnit })
846
+ // : null;
847
+
848
+ const wltpConsumptionWeightedPowerCombinedContent = wltpWeightedPowerCombined
849
+ ? t('vehicleProps:value.consumptionPowerCombined', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit })
850
+ : null;
851
+ const consumptionCombinedContent = t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit });
852
+ const wltpConsumptionCombinedContent = wltpCombined ?
853
+ t('vehicleProps:value.consumptionCombined', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
854
+ : null;
855
+ const wltpConsumptionWeightedCombinedContent = wltpWeightedCombined ?
856
+ t('vehicleProps:value.consumptionCombined', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit })
857
+ : null;
858
+
859
+ const co2 = car.environmentEmissions.co2;
860
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
861
+ const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
862
+ const co2Value = Number.isFinite(co2)
863
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
864
+ : t('vehicleProps:value.na');
865
+ const wltpCo2Value = Number.isFinite(wltpCo2)
866
+ ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
867
+ : null;
868
+ const wltpCo2PluginValue = Number.isFinite(wltpCo2)
869
+ ? t('vehicleProps:value.wltpCo2WtdCombined', { co2: wltpCo2.toLocaleString(language) })
870
+ : null;
871
+ const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
872
+ ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
873
+ : null;
874
+ // ADV-88: "is a hybrid car" is now determined by fuel type (hybrid electric + diesel/petrol),
875
+ // not engineData.hybridPlugin.
876
+ const hybridPlugin = car.consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
877
+ || car.consumption.fuel === 'selector_fuel_hybridElectricalPetrol';
878
+
879
+ // ADV-88: ANY hybrid car (new or used) shows both weighted (gew., komb) and discharged
880
+ // (entladen, komb) fuel consumption + a discharged CO2 class.
881
+ if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
882
+ const ADV88_DEFAULT_DISCHARGED_COMBINED = 19.9;
883
+ const ADV88_DEFAULT_DISCHARGED_CO2_CLASS = 'selector_energyEfficiencyClass_g';
884
+
885
+ const dischargedCombined = Number.isFinite(wltpCombined) ? wltpCombined : ADV88_DEFAULT_DISCHARGED_COMBINED;
886
+ const dischargedClass = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass || ADV88_DEFAULT_DISCHARGED_CO2_CLASS;
887
+
888
+ const weightedCombinedLabeled = t('vehicleProps:value.wltpWeightedCombinedLabel', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit });
889
+ const dischargedCombinedLabeled = t('vehicleProps:value.wltpDischargedCombinedLabel', { consumption: dischargedCombined.toLocaleString(language), unit: translatedUnit });
890
+ const co2WeightedContent = Number.isFinite(wltpCo2)
891
+ ? t('vehicleProps:value.wltpCo2WtdCombinedShort', { co2: wltpCo2.toLocaleString(language) })
892
+ : null;
893
+ const co2ClassWeighted = isPropDefined(wltpEnergyEfficiencyClass)
894
+ ? t('vehicleProps:value.co2ClassWeighted', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
895
+ : null;
896
+ const co2ClassDischarged = t('vehicleProps:value.co2ClassDischarged', { class: t(`cbd:${dischargedClass}`) });
897
+
898
+ return <React.Fragment>
899
+ {wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{' + '}
900
+ {wrapValue(weightedCombinedLabeled)}{', '}
901
+ {wrapValue(dischargedCombinedLabeled)}
902
+ {co2WeightedContent && <>{', '}{wrapValue(co2WeightedContent)}</>}
903
+ {co2ClassWeighted && <>{', '}{co2ClassWeighted}</>}
904
+ {', '}{co2ClassDischarged}
905
+ </React.Fragment>
906
+ }
907
+
908
+ if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
909
+ return <React.Fragment>
910
+ {wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{', '}
911
+ {wrapValue(wltpConsumptionWeightedCombinedContent)}{', '}
912
+ {wrapValue(wltpCo2PluginValue)}
913
+ {co2ClassValue && <><br />{co2ClassValue}</>}
914
+ </React.Fragment>
915
+ }
916
+
917
+ if (wltpConsumptionCombinedContent && wltpCo2Value) {
918
+ return <React.Fragment>
919
+ {wrapValue(wltpConsumptionCombinedContent)}{', '}
920
+ {wrapValue(wltpCo2Value)}
921
+ {co2ClassValue && <><br />{co2ClassValue}</>}
922
+ </React.Fragment>
923
+ }
924
+
925
+ return Number.isFinite(consumptionCombined) && Number.isFinite(consumptionPowerCombined)
926
+ ? <React.Fragment>
927
+ {consumptionPowerCombined && hybridPlugin ? wrapValue(consumptionPowerCombinedContent) : ''}
928
+ {consumptionPowerCombined && hybridPlugin ? <br /> : ''}
929
+ {wrapValue(consumptionCombinedContent)} <br />
930
+ {wrapValue(co2Value)}
931
+ {co2ClassValue && <><br />{co2ClassValue}</>}
932
+ </React.Fragment>
933
+ : t('vehicleProps:value.na');
934
+ }
935
+ },
936
+
937
+ rangeHydrogen: {
938
+ title: t('vehicleProps:title.rangeHydrogen'),
939
+ get value() {
940
+ const { rangeHydrogen } = car.engineData;
941
+ return Number.isFinite(rangeHydrogen)
942
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: rangeHydrogen.toLocaleString(language) })
943
+ : t('vehicleProps:value.na');
944
+ }
945
+ },
946
+ batteryRangeElectric: {
947
+ title: t('vehicleProps:title.batteryRangeElectric'),
948
+ get value() {
949
+ const batteryRangeElectric = car.battery && car.battery.batteryRangeElectric;
950
+ return Number.isFinite(batteryRangeElectric)
951
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: batteryRangeElectric.toLocaleString(language) })
952
+ : t('vehicleProps:value.na');
953
+ }
954
+ },
955
+
956
+ c02: {
957
+ title: t('vehicleProps:title.co2'),
958
+ get value() {
959
+ const c02 = car.environmentEmissions.co2;
960
+ return Number.isFinite(c02)
961
+ ? t('vehicleProps:value.co2', { co2: c02.toLocaleString(language) })
962
+ : t('vehicleProps:value.na');
963
+ }
964
+ },
965
+
966
+ consumptionAndCo2: {
967
+ title: t('vehicleProps:title.consumptionAndCo2'),
968
+ get value() {
969
+ const consumptionPowerCombined = car.consumption.consumptionCombined;
970
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
971
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
972
+ const co2 = car.environmentEmissions.co2;
973
+ const consumptionValue = Number.isFinite(consumptionPowerCombined)
974
+ ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
975
+ : t('vehicleProps:value.na');
976
+ const co2Value = Number.isFinite(co2)
977
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
978
+ : t('vehicleProps:value.na');
979
+
980
+ return `${consumptionValue} | ${co2Value}`;
981
+ }
982
+ },
983
+ emissionClass: {
984
+ title: t('vehicleProps:title.emissionClass'),
985
+ get value() {
986
+ const emissionClass = car.environmentEmissions.emissionClass;
987
+ return isPropDefined(emissionClass) ? t(`cbd:${emissionClass}`) : t('vehicleProps:value.na');
988
+ }
989
+ },
990
+
991
+ emissionSticker: {
992
+ title: t('vehicleProps:title.emissionsSticker'),
993
+ get value() {
994
+ const emissionSticker = car.environmentEmissions.emissionSticker;
995
+ let icon = null;
996
+ const size = 25;
997
+
998
+ if (emissionSticker !== 'selector_emissionSticker_no') {
999
+ icon = EMISSION_STICKERS_ICONS[emissionSticker];
1000
+ }
1001
+
1002
+ return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
1003
+ }
1004
+ },
1005
+
1006
+ wpEmissionSticker: {
1007
+ title: t('vehicleProps:title.emissionsSticker'),
1008
+ get value() {
1009
+ const emissionSticker = car.environmentEmissions.emissionSticker;
1010
+ let icon = null;
1011
+ const size = 25;
1012
+
1013
+ if (emissionSticker !== 'selector_emissionSticker_no') {
1014
+ icon = WP_EMISSION_STICKERS_ICONS[emissionSticker];
1015
+ }
1016
+
1017
+ return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
1018
+ }
1019
+ },
1020
+
1021
+ energyEfficiencyClass: {
1022
+ title: t('vehicleProps:title.energyEfficiencyClass'),
1023
+ subTitle: t('vehicleProps:title.subTitle'),
1024
+ get value() {
1025
+ const level = car.environmentEmissions.energyEfficiencyClass;
1026
+ return isPropDefined(level) ? <CO2Efficiency level={level} t={t} /> : t('vehicleProps:value.na');
1027
+ }
1028
+ },
1029
+
1030
+ offerAvailability: {
1031
+ title: t('vehicleProps:title.offerAvailability'),
1032
+ icon: 'carAvailability',
1033
+ get value() {
1034
+ const offerAvailabilityMode = offer.availabilityMode;
1035
+ const offerAvailabilityTimestamp = offer.availabilityFrom;
1036
+ const humanViewTime = moment.unix(offerAvailabilityTimestamp).format('DD.MM.YYYY');
1037
+ let offerAvailability: string;
1038
+
1039
+ switch (offerAvailabilityMode) {
1040
+ case 'selector_availabilityMode_always':
1041
+ offerAvailability = t(`cbd:${offerAvailabilityMode}`);
1042
+ break;
1043
+
1044
+ case 'selector_availabilityMode_fromDate':
1045
+ if (offer.deliveryPeriod != null && offer.deliveryPeriod !== 'selector_unknown') {
1046
+ offerAvailability = formatDeliveryPeriod(t, offer.deliveryPeriod);
1047
+ break;
1048
+ }
1049
+
1050
+ if (moment.utc(offerAvailabilityTimestamp, 'X').isBefore()) {
1051
+ offerAvailability = t('cbd:selector_availabilityMode_always');
1052
+ } else if (!!offerAvailabilityTimestamp) {
1053
+ offerAvailability = t('vehicleProps:value.fromDate', { date: humanViewTime });
1054
+ } else {
1055
+ offerAvailability = t('vehicleProps:value.onRequest'); // case when "availabilityFrom" is undefined
1056
+ }
1057
+ break;
1058
+
1059
+ default:
1060
+ if (!offerAvailabilityMode && !firstRegistration && !mileage) offerAvailability = t('vehicleProps:value.onRequest');
1061
+ else offerAvailability = null;
1062
+ }
1063
+ return isPropDefined(offerAvailability) ? offerAvailability : t('vehicleProps:value.na');
1064
+ }
1065
+ },
1066
+
1067
+ lastTechnicalService: {
1068
+ title: t('vehicleProps:title.lastTechnicalService'),
1069
+ get value() {
1070
+ const lastTechnicalService = car.careService.lastTechnicalService;
1071
+ return Number.isFinite(lastTechnicalService)
1072
+ ? formatTimestamp({ timestamp: lastTechnicalService, format: 'MM/YYYY' })
1073
+ : t('vehicleProps:value.na');
1074
+ }
1075
+ },
1076
+
1077
+ generalInspection: {
1078
+ title: t('vehicleProps:title.generalInspection'),
1079
+ get value() {
1080
+ const generalInspection = car.careService.generalInspection;
1081
+ if (car.offer.newHuAu) {
1082
+ return t('vehicleProps:value.new');
1083
+ // tslint:disable-next-line:no-else-after-return
1084
+ }else {
1085
+ return Number.isFinite(generalInspection)
1086
+ ? formatTimestamp({ timestamp: generalInspection, format: 'MM/YYYY' })
1087
+ : t('vehicleProps:value.na');
1088
+ }
1089
+ }
1090
+ },
1091
+
1092
+ condition: {
1093
+ title: t('vehicleProps:title.сondition'),
1094
+ get value() {
1095
+ return isPropDefined(condition)
1096
+ ? t(`cbd:${condition}`)
1097
+ : t('vehicleProps:value.na');
1098
+ }
1099
+ },
1100
+
1101
+ numberOfPreviousOwnersSimple: {
1102
+ title: t('vehicleProps:title.numberOfPreviousOwners'),
1103
+ get value() {
1104
+ return Number.isFinite(numberOfPreviousOwners)
1105
+ ? numberOfPreviousOwners
1106
+ : t('vehicleProps:value.na');
1107
+ }
1108
+ },
1109
+
1110
+ guarantee: {
1111
+ title: t('vehicleProps:title.guarantee'),
1112
+ get value() {
1113
+ const guarantee = car.offer.warranty;
1114
+ return isPropDefined(guarantee)
1115
+ ? (guarantee ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
1116
+ : t('vehicleProps:value.na');
1117
+ }
1118
+ },
1119
+
1120
+ maintenanceGuide: {
1121
+ title: t('vehicleProps:title.maintenanceGuide'),
1122
+ get value() {
1123
+ const fullserviceHistory = car.careService.fullServiceHistory;
1124
+ return isPropDefined(fullserviceHistory)
1125
+ ? (fullserviceHistory ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
1126
+ : t('vehicleProps:value.na');
1127
+ }
1128
+ },
1129
+
1130
+ nonSmokerVehicle: {
1131
+ title: t('vehicleProps:title.nonSmokingVehicle'),
1132
+ get value() {
1133
+ return isPropDefined(nonSmokerVehicle)
1134
+ ? (nonSmokerVehicle ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
1135
+ : t('vehicleProps:value.na');
1136
+ }
1137
+ },
1138
+
1139
+ manufacturerColorName: {
1140
+ title: t('vehicleProps:title.manufacturerColorName'),
1141
+ get value() {
1142
+ const color = car.exterior.manufacturerColorName;
1143
+
1144
+ if (typeof color !== 'string' || color === '') {
1145
+ return t('vehicleProps:value.na');
1146
+ }
1147
+
1148
+ return color[0].toUpperCase() + color.slice(1);
1149
+ }
1150
+ },
1151
+
1152
+ exteriorColor: {
1153
+ title: t('vehicleProps:title.colour'),
1154
+ get value() {
1155
+ const exteriorColor = car.exterior.exteriorColor;
1156
+ return isPropDefined(exteriorColor)
1157
+ ? t(`cbd:${exteriorColor.replace('exterior_', '')}`)
1158
+ : t('vehicleProps:value.na');
1159
+ }
1160
+ },
1161
+
1162
+ appointmentsColor: {
1163
+ title: t('vehicleProps:title.appointmentsColor'),
1164
+ get value() {
1165
+ const interiorColor = car.interior.interiorColor;
1166
+ return isPropDefined(interiorColor)
1167
+ ? t(`cbd:${interiorColor.replace('interior_', '')}`)
1168
+ : t('vehicleProps:value.na');
1169
+ }
1170
+ },
1171
+
1172
+ interiorType: {
1173
+ title: t('vehicleProps:title.interiorType'),
1174
+ get value() {
1175
+ const interiorType = car.interior.interiorType;
1176
+ return isPropDefined(interiorType)
1177
+ ? t(`cbd:${interiorType}`)
1178
+ : t('vehicleProps:value.na');
1179
+ }
1180
+ },
1181
+ signOfUse : {
1182
+ title: t('vehicleProps:title.signsOfUse'),
1183
+ isVisible: mileage > 100, // tslint:disable-line
1184
+ isLongTitle: true,
1185
+ get value() {
1186
+ return t('vehicleProps:value.yes');
1187
+ }
1188
+ },
1189
+ countryVersion : {
1190
+ title: t('vehicleProps:title.countryVersion'),
1191
+ get value() {
1192
+ const countryName = car.countryActive[language];
1193
+ if (!countryVersion) return t('vehicleProps:value.na');
1194
+ switch (countryVersion) {
1195
+ case 'de':
1196
+ return t('vehicleProps:value.countryDEversion');
1197
+ break;
1198
+ case 'eu':
1199
+ return t('vehicleProps:value.countryEUversion');
1200
+ break;
1201
+ case 'at':
1202
+ return t('vehicleProps:value.countryATversion');
1203
+ break;
1204
+ default:
1205
+ return t('vehicleProps:value.countryVersionName', { countryName });
1206
+ }
1207
+ }
1208
+ },
1209
+ wltpCo2: {
1210
+ title: t('vehicleProps:title.wltpCo2'),
1211
+ get value() {
1212
+ const c02 = car.environmentEmissions.wltpCo2;
1213
+ return Number.isFinite(c02)
1214
+ ? t('vehicleProps:value.wltpCo2', { co2: c02.toLocaleString(language) })
1215
+ : t('vehicleProps:value.na');
1216
+ }
1217
+ },
1218
+ wltpCo2Plugin: {
1219
+ title: t('vehicleProps:title.wltpCo2Plugin'),
1220
+ get value() {
1221
+ const c02 = car.environmentEmissions.wltpCo2;
1222
+ return Number.isFinite(c02)
1223
+ ? t('vehicleProps:value.wltpCo2', { co2: c02.toLocaleString(language) })
1224
+ : t('vehicleProps:value.na');
1225
+ }
1226
+ },
1227
+ wltpCo2Discharged: {
1228
+ title: t('vehicleProps:title.wltpCo2Discharged'),
1229
+ get value() {
1230
+ const wltpCo2 = car.environmentEmissions.wltpCo2Discharged;
1231
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1232
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1233
+ return Number.isFinite(wltpCo2)
1234
+ ? t('vehicleProps:value.wltpCo2', { co2: wltpCo2.toLocaleString(language), unit: translatedUnit })
1235
+ : t('vehicleProps:value.na');
1236
+ }
1237
+ },
1238
+ wltpEnergyEfficiencyClass: {
1239
+ // title: t('vehicleProps:title.wltpEnergyEfficiencyClass'),
1240
+ // subTitle: t('vehicleProps:title.subTitle'),
1241
+ get value() {
1242
+ const level = car.environmentEmissions.wltpEnergyEfficiencyClass;
1243
+ const wltpLevel = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass;
1244
+ const { hybridPlugin } = car.engineData;
1245
+ const subtitle = hybridPlugin ? t('vehicleProps:title.wltpCO2SubTitle') : t('vehicleProps:title.wltpCO2SubTitleComb');
1246
+ return isPropDefined(level) ?
1247
+ <CO2Efficiency
1248
+ title={t('vehicleProps:title.wltpCO2Title')}
1249
+ subTitle={subtitle}
1250
+ wltpLevel={wltpLevel}
1251
+ level={level}
1252
+ t={t}
1253
+ levelTitle={t('vehicleProps:title.wltpCO2WidgetComb')}
1254
+ wltpLevelTitle={t('vehicleProps:title.wltpCO2WidgetDischargedBattery')}
1255
+ hybridPlugin={hybridPlugin}
1256
+ isWltp
1257
+ /> : t('vehicleProps:value.na');
1258
+ }
1259
+ },
1260
+ wltpDischargedEnergyEfficiencyClass: {
1261
+ title: t('vehicleProps:title.wltpDischargedEnergyEfficiencyClass'),
1262
+ subTitle: t('vehicleProps:title.subTitle'),
1263
+ get value() {
1264
+ const level = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass;
1265
+ return isPropDefined(level) ? <CO2Efficiency level={level} isWltp t={t} /> : t('vehicleProps:value.na');
1266
+ }
1267
+ },
1268
+ wltpRange: {
1269
+ title: t('vehicleProps:title.wltpRange'),
1270
+ get value() {
1271
+ const wltpRange = car.battery && car.battery.wltpRange;
1272
+ return Number.isFinite(wltpRange)
1273
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpRange.toLocaleString(language) })
1274
+ : t('vehicleProps:value.na');
1275
+ }
1276
+ },
1277
+ wltpTotalRange: {
1278
+ title: t('vehicleProps:title.wltpTotalRange'),
1279
+ get value() {
1280
+ const wltpTotalRange = car.battery && car.battery.wltpTotalRange;
1281
+ return Number.isFinite(wltpTotalRange)
1282
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpTotalRange.toLocaleString(language) })
1283
+ : t('vehicleProps:value.na');
1284
+ }
1285
+ },
1286
+
1287
+ wltpRangeCity: {
1288
+ title: t('vehicleProps:title.wltpRangeCity'),
1289
+ get value() {
1290
+ const wltpRangeCity = car.battery && car.battery.wltpRangeCity;
1291
+ return Number.isFinite(wltpRangeCity)
1292
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpRangeCity.toLocaleString(language) })
1293
+ : t('vehicleProps:value.na');
1294
+ }
1295
+ },
1296
+ wltpTotalRangeCity: {
1297
+ title: t('vehicleProps:title.wltpTotalRangeCity'),
1298
+ get value() {
1299
+ const wltpTotalRangeCity = car.battery && car.battery.wltpTotalRangeCity;
1300
+ return Number.isFinite(wltpTotalRangeCity)
1301
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: wltpTotalRangeCity.toLocaleString(language) })
1302
+ : t('vehicleProps:value.na');
1303
+ }
1304
+ },
1305
+ wltpWeightedCombined: {
1306
+ title: t('vehicleProps:title.wltpWeightedCombined'),
1307
+ get value() {
1308
+ const wltpWeightedCombined = car.consumption.wltpWeightedCombined;
1309
+ return Number.isFinite(wltpWeightedCombined)
1310
+ ? t('vehicleProps:value.consumptionCombined', { consumption: wltpWeightedCombined.toLocaleString(language) })
1311
+ : t('vehicleProps:value.na');
1312
+ }
1313
+ },
1314
+ wltpCombined: {
1315
+ title: t('vehicleProps:title.wltpCombined'),
1316
+ get value() {
1317
+ const wltpCombined = car.consumption.wltpCombined;
1318
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1319
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1320
+ return Number.isFinite(wltpCombined)
1321
+ ? t('vehicleProps:value.consumption', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
1322
+ : t('vehicleProps:value.na');
1323
+ }
1324
+ },
1325
+ wltpCombinedGas: {
1326
+ title: t('vehicleProps:title.wltpCombined'),
1327
+ get value() {
1328
+ const wltpCombined = car.consumption.wltpCombined;
1329
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1330
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1331
+ return Number.isFinite(wltpCombined)
1332
+ ? t('vehicleProps:value.consumptionGas', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
1333
+ : t('vehicleProps:value.na');
1334
+ }
1335
+ },
1336
+ wltpCombinedPlugin: {
1337
+ title: t('vehicleProps:title.wltpCombinedPlugin'),
1338
+ get value() {
1339
+ const wltpCombined = car.consumption.wltpCombined;
1340
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1341
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1342
+ return Number.isFinite(wltpCombined)
1343
+ ? t('vehicleProps:value.consumption', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
1344
+ : t('vehicleProps:value.na');
1345
+ }
1346
+ },
1347
+ wltpSlow: {
1348
+ title: t('vehicleProps:title.wltpSlow'),
1349
+ get value() {
1350
+ const wltpSlow = car.consumption.wltpSlow;
1351
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1352
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1353
+ return Number.isFinite(wltpSlow)
1354
+ ? t('vehicleProps:value.consumption', { consumption: wltpSlow.toLocaleString(language), unit: translatedUnit })
1355
+ : t('vehicleProps:value.na');
1356
+ }
1357
+ },
1358
+ wltpSlowGas: {
1359
+ title: t('vehicleProps:title.wltpSlow'),
1360
+ get value() {
1361
+ const wltpSlow = car.consumption.wltpSlow;
1362
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1363
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1364
+ return Number.isFinite(wltpSlow)
1365
+ ? t('vehicleProps:value.consumptionGas', { consumption: wltpSlow.toLocaleString(language), unit: translatedUnit })
1366
+ : t('vehicleProps:value.na');
1367
+ }
1368
+ },
1369
+ wltpSlowPlugin: {
1370
+ title: t('vehicleProps:title.wltpSlowPlugin'),
1371
+ get value() {
1372
+ const wltpSlow = car.consumption.wltpSlow;
1373
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1374
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1375
+ return Number.isFinite(wltpSlow)
1376
+ ? t('vehicleProps:value.consumption', { consumption: wltpSlow.toLocaleString(language), unit: translatedUnit })
1377
+ : t('vehicleProps:value.na');
1378
+ }
1379
+ },
1380
+ wltpMedium: {
1381
+ title: t('vehicleProps:title.wltpMedium'),
1382
+ get value() {
1383
+ const wltpMedium = car.consumption.wltpMedium;
1384
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1385
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1386
+ return Number.isFinite(wltpMedium)
1387
+ ? t('vehicleProps:value.consumption', { consumption: wltpMedium.toLocaleString(language), unit: translatedUnit })
1388
+ : t('vehicleProps:value.na');
1389
+ }
1390
+ },
1391
+ wltpMediumGas: {
1392
+ title: t('vehicleProps:title.wltpMedium'),
1393
+ get value() {
1394
+ const wltpMedium = car.consumption.wltpMedium;
1395
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1396
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1397
+ return Number.isFinite(wltpMedium)
1398
+ ? t('vehicleProps:value.consumptionGas', { consumption: wltpMedium.toLocaleString(language), unit: translatedUnit })
1399
+ : t('vehicleProps:value.na');
1400
+ }
1401
+ },
1402
+ wltpMediumPlugin: {
1403
+ title: t('vehicleProps:title.wltpMediumPlugin'),
1404
+ get value() {
1405
+ const wltpMedium = car.consumption.wltpMedium;
1406
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1407
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1408
+ return Number.isFinite(wltpMedium)
1409
+ ? t('vehicleProps:value.consumption', { consumption: wltpMedium.toLocaleString(language), unit: translatedUnit })
1410
+ : t('vehicleProps:value.na');
1411
+ }
1412
+ },
1413
+ wltpFast: {
1414
+ title: t('vehicleProps:title.wltpFast'),
1415
+ get value() {
1416
+ const wltpFast = car.consumption.wltpFast;
1417
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1418
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1419
+ return Number.isFinite(wltpFast)
1420
+ ? t('vehicleProps:value.consumption', { consumption: wltpFast.toLocaleString(language), unit: translatedUnit })
1421
+ : t('vehicleProps:value.na');
1422
+ }
1423
+ },
1424
+ wltpFastGas: {
1425
+ title: t('vehicleProps:title.wltpFast'),
1426
+ get value() {
1427
+ const wltpFast = car.consumption.wltpFast;
1428
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1429
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1430
+ return Number.isFinite(wltpFast)
1431
+ ? t('vehicleProps:value.consumptionGas', { consumption: wltpFast.toLocaleString(language), unit: translatedUnit })
1432
+ : t('vehicleProps:value.na');
1433
+ }
1434
+ },
1435
+ wltpFastPlugin: {
1436
+ title: t('vehicleProps:title.wltpFastPlugin'),
1437
+ get value() {
1438
+ const wltpFast = car.consumption.wltpFast;
1439
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1440
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1441
+ return Number.isFinite(wltpFast)
1442
+ ? t('vehicleProps:value.consumption', { consumption: wltpFast.toLocaleString(language), unit: translatedUnit })
1443
+ : t('vehicleProps:value.na');
1444
+ }
1445
+ },
1446
+ wltpVeryFast: {
1447
+ title: t('vehicleProps:title.wltpVeryFast'),
1448
+ get value() {
1449
+ const wltpVeryFast = car.consumption.wltpVeryFast;
1450
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1451
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1452
+ return Number.isFinite(wltpVeryFast)
1453
+ ? t('vehicleProps:value.consumption', { consumption: wltpVeryFast.toLocaleString(language), unit: translatedUnit })
1454
+ : t('vehicleProps:value.na');
1455
+ }
1456
+ },
1457
+ wltpVeryFastGas: {
1458
+ title: t('vehicleProps:title.wltpVeryFast'),
1459
+ get value() {
1460
+ const wltpVeryFast = car.consumption.wltpVeryFast;
1461
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1462
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1463
+ return Number.isFinite(wltpVeryFast)
1464
+ ? t('vehicleProps:value.consumptionGas', { consumption: wltpVeryFast.toLocaleString(language), unit: translatedUnit })
1465
+ : t('vehicleProps:value.na');
1466
+ }
1467
+ },
1468
+ wltpVeryFastPlugin: {
1469
+ title: t('vehicleProps:title.wltpVeryFastPlugin'),
1470
+ get value() {
1471
+ const wltpVeryFast = car.consumption.wltpVeryFast;
1472
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1473
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1474
+ return Number.isFinite(wltpVeryFast)
1475
+ ? t('vehicleProps:value.consumption', { consumption: wltpVeryFast.toLocaleString(language), unit: translatedUnit })
1476
+ : t('vehicleProps:value.na');
1477
+ }
1478
+ },
1479
+ wltpWeightedPowerCombined: {
1480
+ title: t('vehicleProps:title.wltpWeightedPowerCombined'),
1481
+ get value() {
1482
+ const wltpWeightedPowerCombined = car.consumption.wltpWeightedPowerCombined;
1483
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1484
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1485
+ return Number.isFinite(wltpWeightedPowerCombined)
1486
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit })
1487
+ : t('vehicleProps:value.na');
1488
+ }
1489
+ },
1490
+ wltpPowerCombined: {
1491
+ title: t('vehicleProps:title.wltpPowerCombined'),
1492
+ get value() {
1493
+ const wltpPowerCombined = car.consumption.wltpPowerCombined;
1494
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1495
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1496
+ return Number.isFinite(wltpPowerCombined)
1497
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerCombined.toLocaleString(language), unit: translatedUnit })
1498
+ : t('vehicleProps:value.na');
1499
+ }
1500
+ },
1501
+ wltpPowerSlow: {
1502
+ title: t('vehicleProps:title.wltpPowerSlow'),
1503
+ get value() {
1504
+ const wltpPowerSlow = car.consumption.wltpPowerSlow;
1505
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1506
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1507
+ return Number.isFinite(wltpPowerSlow)
1508
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerSlow.toLocaleString(language), unit: translatedUnit })
1509
+ : t('vehicleProps:value.na');
1510
+ }
1511
+ },
1512
+ wltpPowerMedium: {
1513
+ title: t('vehicleProps:title.wltpPowerMedium'),
1514
+ get value() {
1515
+ const wltpPowerMedium = car.consumption.wltpPowerMedium;
1516
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1517
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1518
+ return Number.isFinite(wltpPowerMedium)
1519
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerMedium.toLocaleString(language), unit: translatedUnit })
1520
+ : t('vehicleProps:value.na');
1521
+ }
1522
+ },
1523
+ wltpPowerFast: {
1524
+ title: t('vehicleProps:title.wltpPowerFast'),
1525
+ get value() {
1526
+ const wltpPowerFast = car.consumption.wltpPowerFast;
1527
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1528
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1529
+ return Number.isFinite(wltpPowerFast)
1530
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerFast.toLocaleString(language), unit: translatedUnit })
1531
+ : t('vehicleProps:value.na');
1532
+ }
1533
+ },
1534
+ wltpPowerVeryFast: {
1535
+ title: t('vehicleProps:title.wltpPowerVeryFast'),
1536
+ get value() {
1537
+ const wltpPowerVeryFast = car.consumption.wltpPowerVeryFast;
1538
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1539
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1540
+ return Number.isFinite(wltpPowerVeryFast)
1541
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerVeryFast.toLocaleString(language), unit: translatedUnit })
1542
+ : t('vehicleProps:value.na');
1543
+ }
1544
+ },
1545
+ wltpPowerCombinedPlugin: {
1546
+ title: t('vehicleProps:title.wltpPowerCombined'),
1547
+ get value() {
1548
+ const wltpPowerCombined = car.consumption.wltpPowerCombined;
1549
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1550
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1551
+ return Number.isFinite(wltpPowerCombined)
1552
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerCombined.toLocaleString(language), unit: translatedUnit })
1553
+ : t('vehicleProps:value.na');
1554
+ }
1555
+ },
1556
+ wltpPowerSlowPlugin: {
1557
+ title: t('vehicleProps:title.wltpPowerSlow'),
1558
+ get value() {
1559
+ const wltpPowerSlow = car.consumption.wltpPowerSlow;
1560
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1561
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1562
+ return Number.isFinite(wltpPowerSlow)
1563
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerSlow.toLocaleString(language), unit: translatedUnit })
1564
+ : t('vehicleProps:value.na');
1565
+ }
1566
+ },
1567
+ wltpPowerMediumPlugin: {
1568
+ title: t('vehicleProps:title.wltpPowerMedium'),
1569
+ get value() {
1570
+ const wltpPowerMedium = car.consumption.wltpPowerMedium;
1571
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1572
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1573
+ return Number.isFinite(wltpPowerMedium)
1574
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerMedium.toLocaleString(language), unit: translatedUnit })
1575
+ : t('vehicleProps:value.na');
1576
+ }
1577
+ },
1578
+ wltpPowerFastPlugin: {
1579
+ title: t('vehicleProps:title.wltpPowerFast'),
1580
+ get value() {
1581
+ const wltpPowerFast = car.consumption.wltpPowerFast;
1582
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1583
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1584
+ return Number.isFinite(wltpPowerFast)
1585
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerFast.toLocaleString(language), unit: translatedUnit })
1586
+ : t('vehicleProps:value.na');
1587
+ }
1588
+ },
1589
+ wltpPowerVeryFastPlugin: {
1590
+ title: t('vehicleProps:title.wltpPowerVeryFast'),
1591
+ get value() {
1592
+ const wltpPowerVeryFast = car.consumption.wltpPowerVeryFast;
1593
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
1594
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
1595
+ return Number.isFinite(wltpPowerVeryFast)
1596
+ ? t('vehicleProps:value.consumptionPower', { consumption: wltpPowerVeryFast.toLocaleString(language), unit: translatedUnit })
1597
+ : t('vehicleProps:value.na');
1598
+ }
1599
+ },
1600
+ wltpEnergyCosts: {
1601
+ title: t('vehicleProps:title.wltpEnergyCosts'),
1602
+ get value() {
1603
+ const { fuel } = car.consumption;
1604
+ const { wltpCombined, wltpPowerCombined, wltpWeightedCombined, wltpWeightedPowerCombined } = car.consumption;
1605
+ const { powerPrice, fuelPrice } = car.costModel;
1606
+ const powerCost = {
1607
+ fuelPrice,
1608
+ powerPrice
1609
+ }
1610
+ const { hybridPlugin } = car.engineData;
1611
+ const consumption = {
1612
+ wltpCombined, wltpPowerCombined, wltpWeightedCombined, wltpWeightedPowerCombined
1613
+ }
1614
+ const { getFuelPrice } = financingUtils;
1615
+ const fuelCost = getFuelPrice(fuel, consumption, hybridPlugin, powerCost);
1616
+ return Number.isFinite(fuelCost)
1617
+ ? t('vehicleProps:value.pricePerYear', { price: getFormattedPrice(fuelCost, '$,.2f') })
1618
+ : t('vehicleProps:value.na');
1619
+ }
1620
+ },
1621
+ wltpCo2CostsLow: {
1622
+ get title() {
1623
+ const { co2DefaultCostsLow } = financingUtils;
1624
+ return t('vehicleProps:title.wltpCo2LowPrice', { price: co2DefaultCostsLow })
1625
+ },
1626
+ get value() {
1627
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1628
+
1629
+ const { getCo2Price } = financingUtils;
1630
+ const { co2PriceLow } = getCo2Price(wltpCo2);
1631
+ return Number.isFinite(co2PriceLow)
1632
+ ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceLow, '$,.2f') })
1633
+ : t('vehicleProps:value.na');
1634
+ },
1635
+ get valueDescription() {
1636
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1637
+
1638
+ const { getCo2Price } = financingUtils;
1639
+ const { co2PriceLow } = getCo2Price(wltpCo2);
1640
+ return Number.isFinite(co2PriceLow) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1641
+ }
1642
+ },
1643
+ wltpCo2CostsMiddle: {
1644
+ get title() {
1645
+ const { co2DefaultCostsMedium } = financingUtils;
1646
+ return t('vehicleProps:title.wltpCo2MidPrice', { price: co2DefaultCostsMedium })
1647
+ },
1648
+ get value() {
1649
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1650
+
1651
+ const { getCo2Price } = financingUtils;
1652
+ const { co2PriceMedium } = getCo2Price(wltpCo2);
1653
+ return Number.isFinite(co2PriceMedium)
1654
+ ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceMedium, '$,.2f') })
1655
+ : t('vehicleProps:value.na');
1656
+ },
1657
+ get valueDescription() {
1658
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1659
+
1660
+ const { getCo2Price } = financingUtils;
1661
+ const { co2PriceMedium } = getCo2Price(wltpCo2);
1662
+ return Number.isFinite(co2PriceMedium) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1663
+ }
1664
+ },
1665
+ wltpCo2CostsHigh: {
1666
+ get title() {
1667
+ const { co2DefaultCostsHigh } = financingUtils;
1668
+ return t('vehicleProps:title.wltpCo2HighPrice', { price: co2DefaultCostsHigh })
1669
+ },
1670
+ get value() {
1671
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1672
+
1673
+ const { getCo2Price } = financingUtils;
1674
+ const { co2PriceHigh } = getCo2Price(wltpCo2);
1675
+ return Number.isFinite(co2PriceHigh)
1676
+ ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceHigh, '$,.2f') })
1677
+ : t('vehicleProps:value.na');
1678
+ },
1679
+ get valueDescription() {
1680
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1681
+
1682
+ const { getCo2Price } = financingUtils;
1683
+ const { co2PriceHigh } = getCo2Price(wltpCo2);
1684
+ return Number.isFinite(co2PriceHigh) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1685
+ }
1686
+ },
1687
+ powerPrice: {
1688
+ title: t('vehicleProps:title.powerPrice'),
1689
+ get value() {
1690
+ const fuel = car.consumption.fuel;
1691
+ const { hybridPlugin } = car.engineData;
1692
+
1693
+ const { getBaseFuelPrice } = financingUtils;
1694
+
1695
+ const basePowerPrice = getBaseFuelPrice(fuel, hybridPlugin).powerPrice;
1696
+ const powerPrice = car.costModel.powerPrice ? car.costModel.powerPrice : basePowerPrice;
1697
+
1698
+ return Number.isFinite(powerPrice)
1699
+ ? t('vehicleProps:value.powerPrice', { price: getFormattedPrice(powerPrice, '$,.2f') })
1700
+ : t('vehicleProps:value.na');
1701
+ }
1702
+ },
1703
+ fuelPrice: {
1704
+ title: t('vehicleProps:title.fuelPrice'),
1705
+ get value() {
1706
+ const fuel = car.consumption.fuel;
1707
+ const { hybridPlugin } = car.engineData;
1708
+
1709
+ const { getBaseFuelPrice } = financingUtils;
1710
+
1711
+ const baseFuelPrice = getBaseFuelPrice(fuel, hybridPlugin) ? getBaseFuelPrice(fuel, hybridPlugin).fuelPrice : null;
1712
+
1713
+ const fuelPrice = car.costModel.fuelPrice ? car.costModel.fuelPrice : baseFuelPrice;
1714
+ return Number.isFinite(fuelPrice)
1715
+ ? t('vehicleProps:value.fuelPrice', { price: getFormattedPrice(fuelPrice, '$,.2f') })
1716
+ : t('vehicleProps:value.na');
1717
+ }
1718
+ },
1719
+ consumptionPriceYear: {
1720
+ title: t('vehicleProps:title.consumptionPriceYear'),
1721
+ get value() {
1722
+ const { consumptionPriceYear } = car.costModel;
1723
+ return Number.isFinite(consumptionPriceYear)
1724
+ ? consumptionPriceYear
1725
+ : t('vehicleProps:value.na');
1726
+ }
1727
+ },
1728
+ wltpCostModelTax: {
1729
+ title: t('vehicleProps:title.wltpVehicleTax'),
1730
+ get value() {
1731
+ const cubicCapacity = car.engineData.cubicCapacity;
1732
+ const fuel = car.consumption.fuel;
1733
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1734
+ const { getVehicleTax } = financingUtils;
1735
+ const tax = car.costModel.tax ? car.costModel.tax : getVehicleTax(fuel, cubicCapacity, wltpCo2, firstRegistration);
1736
+ return Number.isFinite(tax)
1737
+ ? t('vehicleProps:value.pricePerYear', { price: getFormattedPrice(tax, '$,.2f') })
1738
+ : t('vehicleProps:value.na');
1739
+ }
1740
+ }
1741
+
1742
+ };
1743
+ return props;
1744
+ };
1745
+
1746
+ export default getDecoratedProps;