<script setup lang="ts">

const props = defineProps<{ APP: any }>()
const content = props.APP.Popup.content
const enterStr = props.APP.Popup.enterStr
const cancelStr = props.APP.Popup.cancelStr
const yesCallback: () => void = props.APP.Popup.yesCallback
const noCallback: () => void = props.APP.Popup.noCallback
// const self = {
// 	content: content,
// 	enterStr: enterStr,
// 	cancelStr: cancelStr,
// 	yesCallback: yesCallback,
// 	noCallback: noCallback,
// }
// props.APP.Popup = self;
function onClickYes() {
	if (yesCallback) {
		yesCallback();
	}
	props.APP.PopupVisible.value = false;
}
function onClickNo() {
	if (noCallback) {
		noCallback();
	}
	props.APP.PopupVisible.value = false;
}
</script>

<template>
	<el-row type="flex" justify="center" align="middle">
		<h1>{{ content }}</h1>
	</el-row>
	<el-row class="mb-4" type="flex" justify="center" align="middle">
		<el-button type="primary" @click.native="() => { onClickNo() }" size="large" round>{{ cancelStr }}
		</el-button>
		<el-button type="primary" @click.native="() => { onClickYes() }" size="large" round>{{ enterStr }}
		</el-button>
	</el-row>
</template>