<script setup>
import {ref} from 'vue'
import {getPPTContentType,getPPTContentItemData,getPPTLayerType} from '../hooks/createPPTContent'

const props=defineProps({
    pageData:{
        type:Object,
        default:{}
    }
})

const lang=ref(window.location.pathname.startsWith('/ppten')?'en':'zh')

</script>

<template>
	<div :class="['ppt-item-box',lang=='en'?'ppt-item-box_en':'']">
		<div class="ppt-title-box">{{pageData.title}}</div>
		<div class="ppt-content-box">
			<div class="container">
				<component 
					:is="getPPTContentType(1,pageData.elements)"
					:itemData="getPPTContentItemData(1,pageData)"
				/>
			</div>
			<div class="layer-wrap">
				<template v-for="item in pageData.layers" :key="item.id">
					<component 
						:is="getPPTLayerType(item)"
						:itemData="item"
					/>
				</template>
			</div>
        </div>
	</div>
</template>



<style lang="scss" scoped>
// @import '../style/common.scss';

</style>
