<template>
	<Dialog v-model="show" :options="{ title: '账单详情' }">
		<template #body-content>
			<div
				v-if="showMessage"
				class="mb-5 inline-flex gap-1.5 text-base text-gray-700"
			>
				<FeatherIcon class="h-4" name="info" />
				<span> 在继续之前，请为您的账户添加账单详情。</span>
			</div>
			<BillingDetails
				ref="billingRef"
				@success="
					() => {
						show = false;
						emit('success');
					}
				"
			/>
		</template>
	</Dialog>
</template>
<script setup>
import BillingDetails from './BillingDetails.vue';
import { FeatherIcon, Dialog } from 'jingrow-ui';
import { ref } from 'vue';

const props = defineProps({
	showMessage: {
		type: Boolean,
		default: false
	}
});
const emit = defineEmits(['success']);
const show = defineModel();
const billingRef = ref(null);
</script>