<template>
    <component :is="blockMap[code]" :scores="scores"/>
    <uv-back-top :scroll-top="scrollTop"/>
</template>

<script setup>
import {createPropDefine} from "@/utils";
import ENFJ from "@/pages/test-center/mbti/components/results/ENFJ.vue";
import ENFP from "@/pages/test-center/mbti/components/results/ENFP.vue";
import ENTJ from "@/pages/test-center/mbti/components/results/ENTJ.vue";
import ENTP from "@/pages/test-center/mbti/components/results/ENTP.vue";
import ESFJ from "@/pages/test-center/mbti/components/results/ESFJ.vue";
import ESFP from "@/pages/test-center/mbti/components/results/ESFP.vue";
import ESTJ from "@/pages/test-center/mbti/components/results/ESTJ.vue";
import ESTP from "@/pages/test-center/mbti/components/results/ESTP.vue";
import INFJ from "@/pages/test-center/mbti/components/results/INFJ.vue";
import INFP from "@/pages/test-center/mbti/components/results/INFP.vue";
import INTJ from "@/pages/test-center/mbti/components/results/INTJ.vue";
import INTP from "@/pages/test-center/mbti/components/results/INTP.vue";
import ISFJ from "@/pages/test-center/mbti/components/results/ISFJ.vue";
import ISFP from "@/pages/test-center/mbti/components/results/ISFP.vue";
import ISTJ from "@/pages/test-center/mbti/components/results/ISTJ.vue";
import ISTP from "@/pages/test-center/mbti/components/results/ISTP.vue";
import {useInjectPageScroll} from "@/hooks/usePageScrollInjection";

defineProps({
    code: createPropDefine(''),
    scores: createPropDefine([], Array)
})

const {scrollTop} = useInjectPageScroll()

const blockMap = {
    'ENFJ': ENFJ,
    'ENFP': ENFP,
    'ENTJ': ENTJ,
    'ENTP': ENTP,
    'ESFJ': ESFJ,
    'ESFP': ESFP,
    'ESTJ': ESTJ,
    'ESTP': ESTP,
    'INFJ': INFJ,
    'INFP': INFP,
    'INTJ': INTJ,
    'INTP': INTP,
    'ISFJ': ISFJ,
    'ISFP': ISFP,
    'ISTJ': ISTJ,
    'ISTP': ISTP
}
</script>

<style scoped>

</style>