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

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