<script setup lang="ts">
import { ResumeComponentPlacement } from '@/types/resume';
import { defineAsyncComponent } from 'vue';

const props = defineProps<{
    componentPlacement: ResumeComponentPlacement | null
}>();

const componentFile = defineAsyncComponent(
    () => import(
        /* @vite-ignore */
        `./resumeComponents/${props.componentPlacement?.component_data?.component?.vue_component_name}`
    )
);

</script>

<template>
    <component :is="componentFile" :componentPlacement="props.componentPlacement" />
</template>
