{"version":3,"file":"index-937aa824.js","sources":["../../../client-app/src/common/applicationPages/CompletedPage/index.tsx","../../../client-app/src/common/applicationPages/DeclinedPage/index.tsx"],"sourcesContent":["import { Headline, HtmlContainer } from \"@n2-common/ui\";\nimport { N2ApplicationStatus } from \"@n2-common/serverGeneratedTypings/n2ApplicationStatus\";\nimport { CommonStatusPageProps } from \"@n2-common/components/ApplicationStatusPage\";\nimport { useTranslation } from \"react-i18next\";\nimport { useApplicationIdContext } from \"@n2-common/components/ApplicationContext\";\nimport { trackCoreBankEvent } from \"@n2-common/lib/gtm\";\nimport { useEffect, useState } from \"react\";\nimport { ApplicationStatusModel } from \"@n2-common/serverGeneratedTypings/applicationStatusModel\";\nimport { fetchApplicationStatusAndRedirectIfNotExpectedState, translationNamepaceFromProduct } from \"../applicationStatusHelpers\";\nimport { useNavigate } from \"react-router-dom\";\n\nconst CompletedPage = ({ navigateToCorrectStepFunc }: CommonStatusPageProps): JSX.Element => {\n const navigate = useNavigate();\n\n const { country, productType, applicationId } = useApplicationIdContext();\n\n const translationNameSpace = translationNamepaceFromProduct(productType);\n \n const { t } = useTranslation(translationNameSpace);\n \n const [applicationStatus, setApplicationStatus] = useState(null);\n\n useEffect(() => {\n fetchApplicationStatusAndRedirectIfNotExpectedState(\n applicationId,\n '',\n (res) => res.Status === N2ApplicationStatus.Completed,\n setApplicationStatus,\n navigate,\n navigateToCorrectStepFunc\n );\n }, [applicationId, navigate, navigateToCorrectStepFunc]);\n useEffect(() => {\n\n if (!applicationStatus) {\n return;\n }\n trackCoreBankEvent(productType, country, \"application_complete\", undefined, applicationId, applicationStatus.IsAgentApplication);\n\n }, [navigate, productType, country, applicationId, applicationStatus]);\n \n return
\n {t(\"ApplicationLandingPages.Completed.Headline\")}\n {t(\"ApplicationLandingPages.Completed.SubHeadline\")}\n ('ApplicationLandingPages.Completed.Body', '')} />\n
\n};\n\nexport default CompletedPage;","import { Headline, HtmlContainer } from '@n2-common/ui';\nimport { N2ApplicationStatus } from '@n2-common/serverGeneratedTypings/n2ApplicationStatus';\nimport { ApplicationStatusPage, CommonStatusPageProps } from '@n2-common/components/ApplicationStatusPage';\nimport { useTranslation } from 'react-i18next';\nimport { useApplicationIdContext } from '@n2-common/components/ApplicationContext';\nimport { translationNamepaceFromProduct } from '../applicationStatusHelpers';\nimport { CmsFragementWithUtmVariants } from '@n2-common/components/CmsNotification';\n\nconst DeclinedPage = ({ navigateToCorrectStepFunc }: CommonStatusPageProps): JSX.Element => {\n const { productType, country, applicantId } = useApplicationIdContext();\n\n const translationNameSpace = translationNamepaceFromProduct(productType);\n\n const { t } = useTranslation(translationNameSpace);\n \n const countryStr = country?.toLowerCase();\n const cmsKeyBase = `declined_${translationNameSpace}_campaign_${countryStr}`;\n\n return (\n res.Status === N2ApplicationStatus.Declined}\n >\n {t('ApplicationLandingPages.Declined.Headline')}\n {t('ApplicationLandingPages.Declined.SubHeadline')}\n ('ApplicationLandingPages.Declined.Body', '')} />\n \n \n );\n};\n\nexport default DeclinedPage;\n"],"names":["CompletedPage","navigateToCorrectStepFunc","navigate","useNavigate","country","productType","applicationId","useApplicationIdContext","translationNameSpace","translationNamepaceFromProduct","t","useTranslation","applicationStatus","setApplicationStatus","useState","useEffect","fetchApplicationStatusAndRedirectIfNotExpectedState","res","N2ApplicationStatus","trackCoreBankEvent","jsx","Headline","HtmlContainer","DeclinedPage","applicantId","countryStr","cmsKeyBase","jsxs","ApplicationStatusPage","CmsFragementWithUtmVariants"],"mappings":"0OAWA,MAAOA,EAAgB,CAAC,CAAE,0BAAAC,KAAoE,CAC1F,MAAMC,EAAWC,IAEX,CAAE,QAAAC,EAAS,YAAAC,EAAa,cAAAC,GAAkBC,EAAwB,EAElEC,EAAuBC,EAA+BJ,CAAW,EAEjE,CAAE,EAAAK,CAAA,EAAMC,EAAeH,CAAoB,EAE3C,CAACI,EAAmBC,CAAoB,EAAIC,WAAsC,IAAI,EAE5FC,OAAAA,EAAAA,UAAU,IAAM,CACZC,EACIV,EACA,GACCW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