\r\n );\r\n}\r\n\r\nexport { NoResults };\r\n","function getThemeClassFromType(type) {\n switch (type.toLowerCase()) {\n case 'aps.download':\n case 'aps.license':\n case 'aps.licensewithvariants':\n case 'aps.licenseproductsectionoverviewpage':\n return 'croc';\n\n case 'aps.event':\n case 'aps.informationmeeting':\n case 'aps.customtraining':\n case 'aps.studytrip':\n case 'aps.webinar':\n case 'aps.training':\n case 'aps.trainingproductsectionoverviewpage':\n return 'panther';\n\n default:\n return 'megaman';\n }\n}\n\nexport { getThemeClassFromType };\n","import React from 'react';\r\n\r\nfunction Label({ type, customText, resourcedTexts }) {\r\n const [className, resourcedText] = getClassAndResourceFromType(type, resourcedTexts);\r\n\r\n /** Note that HTML changes should also be done here: /src/organisms/relatedProducts/label/label.hbs\r\n * ...since the styling is shared. **/\r\n return
{customText ? customText : resourcedText}
;\r\n}\r\n\r\nfunction getClassAndResourceFromType(labelType, resourcedTexts) {\r\n const className = 'sfr-label';\r\n\r\n switch (labelType.toLowerCase()) {\r\n case 'aps.event':\r\n return [className + '--event', resourcedTexts.event];\r\n case 'aps.informationmeeting':\r\n return [className + '--information-meeting', resourcedTexts.informationMeeting];\r\n case 'aps.customtraining':\r\n return [className + '--custom-training', resourcedTexts.customTraining];\r\n case 'aps.studytrip':\r\n return [className + '--study-trip', resourcedTexts.studyTrip];\r\n case 'aps.webinar':\r\n return [className + '--webinar', resourcedTexts.webinar];\r\n case 'aps.training':\r\n return [className + '--training', resourcedTexts.training];\r\n case 'aps.trainingproductsectionoverviewpage':\r\n return [className + '--training-overview', resourcedTexts.trainingOverview];\r\n case 'aps.download':\r\n case 'aps.license':\r\n case 'aps.licensewithvariants':\r\n return [className + '--licence', resourcedTexts.licence];\r\n case 'aps.licenseproductsectionoverviewpage':\r\n return [className + '--licence-overview', resourcedTexts.licenceOverview];\r\n case 'aps.generalcontentpage':\r\n return [className + '--general', resourcedTexts.contentGeneral];\r\n case 'aps.articlepage':\r\n return [className + '--article', resourcedTexts.contentArticle];\r\n case 'aps.blogpostpage':\r\n return [className + '--blog', resourcedTexts.contentBlog];\r\n case 'aps.podcastcontentpage':\r\n return [className + '--podcast', resourcedTexts.contentPodcast];\r\n case 'aps.videocontentpage':\r\n return [className + '--video', resourcedTexts.contentVideo];\r\n case 'aps.webinarcontentpage':\r\n return [className + '--webinar', resourcedTexts.contentWebinar];\r\n case 'aps.newsarticlepage':\r\n return [className + '--news', resourcedTexts.contentNews];\r\n case 'aps.userexperiencepage':\r\n return [className + '--user-experience', resourcedTexts.contentUserExperience];\r\n case 'aps.whitepaperpage':\r\n return [className + '--white-paper', resourcedTexts.contentWhitePaper];\r\n case 'aps.contentmanual':\r\n return [className + '--manual', resourcedTexts.contentManual];\r\n case 'offer':\r\n return [className + '--offer', null];\r\n case 'date':\r\n return [className + '--date', null];\r\n case 'level':\r\n return [className + '--level', null];\r\n default:\r\n return [null, null];\r\n }\r\n}\r\n\r\nexport { Label };\r\n","import React from 'react';\r\nimport { imageSrcSetToString } from '../../../utils/imageSrcSetToString';\r\nimport { getThemeClassFromType } from '../../../utils/getThemeClassFromType';\r\nimport { Label } from '../../Label/Label';\r\n\r\nfunction GenericCard(props) {\r\n const { type, title, url, image, attributes, resourcedTexts } = props;\r\n\r\n const hasImage = image.imageUrls.length > 0;\r\n const imageUrl = imageSrcSetToString(image.imageUrls);\r\n\r\n const labels = attributes.filter((item) => item.key === 'label');\r\n\r\n const dates = attributes.filter((item) => item.key === 'date');\r\n const date = dates.length > 0 && dates[0].value;\r\n\r\n const levels = attributes.filter((item) => item.key === 'level');\r\n const level = levels.length > 0 && levels[0].value;\r\n\r\n const texts = attributes.filter((item) => item.key === 'text');\r\n const text = texts.length > 0 && texts[0].value;\r\n\r\n const listItems = attributes.filter((item) => ['usp', 'learningPoint'].includes(item.key));\r\n\r\n return (\r\n \r\n