<template>
	<Dialog
		v-model="props.showInvoiceDialog"
		:options="{
			size: '3xl',
			title: '本月总使用量'
		}"
	>
		<template #body-content>
			<template v-if="upcomingInvoice.data.upcoming_invoice">
				<div
					v-if="upcomingInvoice.data.upcoming_invoice.status === 'Empty'"
					class="text-base text-gray-600"
				>
					暂无内容
				</div>
				<InvoiceTable
					v-else
					:invoiceId="upcomingInvoice.data.upcoming_invoice.name"
				/>
			</template>
			<template v-else>
				<div class="text-base text-gray-600">暂无内容</div>
			</template>
		</template>
	</Dialog>
</template>

<script setup>
import { inject, ref } from 'vue';
import InvoiceTable from '../InvoiceTable.vue';

const { upcomingInvoice } = inject('billing');
const props = defineProps({
	showInvoiceDialog: Boolean
});
</script>