<template>
	<swiper class="word-view-swiper-box" :indicator-dots="false" :autoplay="false" :circular="false">
		<swiper-item>
			<view class="swiper-item uni-bg-red">
<!--				<learnContent :active-word="activeWord" :pageData="pageData" :active-words="activeWords"></learnContent>-->
				<xuePage :active-word="activeWord" :active-words="activeWords" @play-audio="handlePlayAudio" :pageData="pageData"></xuePage>
			</view>
		</swiper-item>
		<swiper-item>
			<view class="swiper-item uni-bg-red">
				<pinPageVue :active-word="activeWord" :active-words="activeWords" @play-audio="handlePlayAudio"></pinPageVue>
			</view>
		</swiper-item>
		<swiper-item>
			<view class="swiper-item uni-bg-blue">
				<readContent :active-word="activeWord" :pageData="pageData" :active-words="activeWords"></readContent>
			</view>
		</swiper-item>
		<swiper-item>
			<view class="swiper-item uni-bg-blue">
				<selectPageVue :active-word="activeWord" :active-words="activeWords" @play-audio="handlePlayAudio"></selectPageVue>
			</view>
		</swiper-item>
		<swiper-item>
			<view class="swiper-item uni-bg-blue">
				<beiPageVue :active-word="activeWord" :active-words="activeWords" @play-audio="handlePlayAudio"></beiPageVue>
			</view>
		</swiper-item>
	</swiper>
</template>

<script setup>
	import pinPageVue from './pinPage.vue';
	import selectPageVue from './selectPage.vue';
	import beiPageVue from './beiPage.vue';
	import xuePage from './xuePage.vue';
	const props = defineProps({
		activeWord: {
			type: Object,
		},
		pageData: {
			type: Object,
		},
		activeWords: {
			type: Array
		},
	})
	const emits = defineEmits(['play-audio'])

	function handlePlayAudio({url,code}) {
		emits('play-audio',{url,code})
	}
</script>

<style lang="scss" scoped>
</style>