{dictionary.description}
+
+ );
+ },
+ a: ({ node, ...props }) => {
+ return (
+
+ );
+ },
+ }}
+ >
+ {children}
+ + {sectionHeadline.description} +
+ )} + > + )} ++ {dictionary.modal.content} +
++ {modalState === HeroModalStateValues.CLOSED && ( + {modalSummary} + )} + + {modalState === HeroModalStateValues.OPEN && ( + <> + {modalContent} + {modalCta} + > + )} +
+ ); +}; diff --git a/src/features/common/components/hero/hero-info-banner.component.tsx b/src/features/common/components/hero/hero-info-banner.component.tsx new file mode 100644 index 00000000..5e806808 --- /dev/null +++ b/src/features/common/components/hero/hero-info-banner.component.tsx @@ -0,0 +1,76 @@ +import React from "react"; +import styles from "./hero-banner-modal.module.scss"; +import { HomeDictionaryModel } from "@/features/localization/models/home-dictionary.model"; +import { HeroModalStateValues } from "@/features/home/values/hero-modal-state.values"; +import { JWT_INFO_STATE_KEY } from "@/features/home/config/home.config"; +import Link from "next/link"; +import { clsx } from "clsx"; +import { createUrlPath } from "@/libs/utils/path.utils"; +import { DEFAULT_LANGUAGE_CODE } from "@/features/localization/localization.config"; +import { HeroBannerComponent } from "@/features/common/components/hero/hero-banner.component"; +import { HeroModalTypeValues } from "@/features/home/values/hero-modal-type.values"; + +interface HeroInfoBannerComponentProps { + languageCode: string; + dictionary: HomeDictionaryModel["info"]; + modalState: HeroModalStateValues; +} + +export const HeroInfoBannerComponent: React.FC< + HeroInfoBannerComponentProps +> = ({ languageCode, dictionary, modalState }) => { + const ctaPath = createUrlPath([ + languageCode === DEFAULT_LANGUAGE_CODE ? "" : languageCode, + dictionary.ctaButton ? dictionary.ctaButton.path : "", + ]); + const secondaryCtaPath = createUrlPath([ + languageCode === DEFAULT_LANGUAGE_CODE ? "" : languageCode, + dictionary.secondaryCtaButton ? dictionary.secondaryCtaButton.path : "", + ]); + + const description = dictionary.description.split( + dictionary.resources.spec.name, + ); + + return ( +{renderTokens(tokens)}; + })} +