<route lang="jsonc" type="page">{
	"layout": "default",
	"style": {
		"navigationStyle": "custom"
	}
}</route>

<template>
	<view class="mt-84rpx flex justify-center items-center">
		<view v-if="type == 'groupTeaSpecialist'">
			<reserve-notice title="团体茶艺师预约成功" desc="我们会尽快联系您，请保持手机长畅通">
				<template #layout>
					<view class="pb-22rpx mt-40rpx mx-30rpx flex justify-between items-center text-[32rpx] text-center">
						<view class='bg-[#4C9F44] text-[#fff] rounded-24rpx h-90rpx leading-90rpx w-632rpx' @click="reserve.handleRoomDone">完成</view>
					</view>
				</template>
			</reserve-notice>
		</view>

		<view v-if="type == 'teaSpecialist'">
			<reserve-notice title="茶艺师预约成功" desc="可以点击下方查看预约单具体信息">
				<template #layout>
					<view class="pb-22rpx mt-40rpx mx-30rpx flex justify-between items-center text-[32rpx] text-center">
						<view class='bg-[#fff] text-[#303133] rounded-24rpx h-90rpx leading-90rpx mr-28rpx w-300rpx' @click="reserve.handleRoomSeeOrder">查看订单</view>
						<view class='bg-[#4C9F44] text-[#fff] rounded-24rpx h-90rpx leading-90rpx w-300rpx' @click="reserve.handleRoomDone">完成</view>
					</view>
				</template>
			</reserve-notice>
		</view>

		<view v-if="type == 'tipSuccess'">
			<reserve-notice title="打赏成功">
				<template #layout>
					<view class="pb-22rpx mt-40rpx mx-30rpx flex justify-between items-center text-[32rpx] text-center">
						<view class='bg-[#4C9F44] text-[#fff] rounded-24rpx h-90rpx leading-90rpx w-632rpx' @click="reserve.handleTipDone">完成</view>
					</view>
				</template>
			</reserve-notice>
		</view>
	</view>
</template>


<script lang="ts" setup>
	import ReserveNotice from '@/components/notice/Reserve.vue'
	import { router } from '@/utils/tools'

	const type = ref<string>('') // 购买类型 groupTeaSpecialist: 团体茶艺师预约; teaSpecialist: 茶艺师预约; tipSuccess: 打赏成功

	onLoad((args) => {
		type.value = args.type || ''
	})

	const reserve = {
		// 预约茶室 - 查看订单
		handleRoomSeeOrder: () => {
			router.navigateTo('/bundle/order/tea-specialist/order-list')
		},

		// 预约茶室 - 完成
		handleRoomDone: () => {
			router.switchTab('/pages/index/index')
		},

		// 打赏成功 - 完成
		handleTipDone: () => {
			router.switchTab('/pages/index/index')
		}
	}
</script>

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