import { Box, Container, rem, Stack, Text } from "@pikku/mantine/core"
import { CTASection } from "./results/CTASection"
import NextSteps from "./results/NextSteps"
import { QualificationsSection } from "./results/QualificationsSection"
import React from "react"
import { CandidateResults } from "@heygermany/sdk"
import { Emphasize } from "../ui/Emphasize"
import { useI18n } from "@/context/i18n-provider"
export const CandidateResult: React.FunctionComponent<{
candidateResults: CandidateResults
ctaPublicMode?: boolean
}> = ({ candidateResults, ctaPublicMode = false }) => {
const { textContent } = candidateResults
const t = useI18n()
if (!textContent.renderPath) {
return
{t('jobs.result.noeligibletemplate')}
}
const isHelper = textContent.renderPath.startsWith("helper.")
const afterExplanationParaNotes = textContent.notes.afterExplanation
return (
<>
{/* Hero Section */}
{/* First paragraph */}
{textContent.explanation[0] && }
{/* Remaining paragraphs */}
{textContent.explanation.slice(1).map((p: string, i: number) => )}
{/* Visa note(s) after explanation */}
{afterExplanationParaNotes.map((n: string, idx: number) => (
))}
{/* Qualifications Section */}
{/* What does this mean — render only if not Helper */}
{!isHelper && textContent.recognition?.length ? (
{t('jobs.nextsteps.whatdoesthismean')}
{textContent.recognition.slice(1).map((line: string, idx: number) => (
))}
) : null}
{/* NextSteps Section */}
{/* CTA Section */}
>
)
}