---
import * as m from '@/messages';
import { getEntry } from 'astro:content';
import DomainTest from '../../lib/components/DomainTest/DomainTest.svelte';
import config from '@/config';
import type { FaqItem } from '../../content.config';

const { lang } = Astro.params;
const locale = lang || config.defaultLanguage || 'en';
const aboutLevels = await getEntry('faq', `${locale}/severity-levels`);

const data: FaqItem | null = aboutLevels
    ? {
          question: aboutLevels.data.question,
          answer: aboutLevels.rendered?.html || '',
      }
    : null;
---

<h1 class="container zm-u-align-center">{m.resultTitle()}</h1>
<section class="zm-run-test rhythm">
    <DomainTest aboutLevels={data} client:load />
</section>
