<template>
  <n-card>
    <n-code :hljs="hljs" :language="language" :code="props.answers?.code" />
  </n-card>
</template>

<script setup lang="ts">
import { NCard, NCode } from "naive-ui";
import hljs from "highlight.js/lib/core";
import cpp from "highlight.js/lib/languages/cpp";

hljs.registerLanguage("cpp", cpp);

const props = defineProps<{
  challenge: any,
  problem: any,
  answers: any,
}>();

const language = computed(() => props.answers?.language ?? "text");
</script>