<script setup lang="ts">
import { ElDialog } from 'element-plus';
import { ref } from "vue";
import { BJ_Casino_Deeplink } from "../script/BJ_Casino_Deeplink";
import Popup from './Popup.vue';

const servertypeDefault = ref('')
const hostportDefault = ref('')
const patchDefault = ref('')
const servertype = ref(0)
const hostport = ref(0)
const patch = ref(0)
const iscustom = ref(false)
const isBtn_WanOpen = ref(false)
const PopupVisible = ref(false)
const input3 = ref('')
const self = {
	servertypeDefault: servertypeDefault,
	hostportDefault: hostportDefault,
	patchDefault: patchDefault,
	servertype: servertype,
	hostport: hostport,
	patch: patch,
	iscustom: iscustom,
	isBtn_WanOpen: isBtn_WanOpen,
	PopupVisible: PopupVisible,
	Script: null
}
const Script = new BJ_Casino_Deeplink(self);
self.Script = Script;
const ServertypeData = Script.GetServerType();
const HostportData = Script.GetHostport();
const Patch = Script.GetPatch();
</script>

<template>
	<el-dialog v-model="PopupVisible" :show-close="false">
		<Popup :APP="self" />
	</el-dialog>
	<div>
		<h1>
			<div>
				servertype:
				<el-select v-model="servertypeDefault" filterable
					@change="(data: any) => { Script.SelectServertype(data) }">
					<el-option v-for="(item, index) in ServertypeData" :key="item.value" :label="item.label"
						:value="item.value" />
				</el-select>
			</div>
			<div>
				hostport:
				<el-select v-model="hostportDefault" filterable
					@change="(data: any) => { Script.SelectHostport(data) }">
					<el-option v-for="(item, index) in HostportData" :key="item.value" :label="item.label"
						:value="item.value" />
				</el-select>
			</div>
			<div>
				patch:
				<el-select v-model="patchDefault" filterable @change="(data: any) => { Script.SelectPatch(data) }">
					<el-option v-for="(item, index) in Patch" :key="item.value" :label="item.label"
						:value="item.value" />
				</el-select>
			</div>
			<div>
				使用自己帶進來的URL參數
				<label class="switch">
					<input type="checkbox" id="iscustom">
					<span class="slider"></span>
				</label>
			</div>
			<el-button type="success" @click.native="() => { Script.OnclickOpen() }" size="large" round>開啟遊戲&gt;&gt;
			</el-button>
			<span v-show="isBtn_WanOpen">
				<el-button type="success" @click.native="() => { Script.OnclickWanOpen() }" size="large" round>
					外網開啟遊戲&gt;&gt;
				</el-button>
			</span>
			<br>
			<el-button type="primary" @click.native="() => { Script.Install_Debug() }" size="large" round>
				安裝Debug&gt;&gt;
			</el-button>
			<br>
			<el-button type="primary" @click.native="() => { Script.Install_Release() }" size="large" round>
				安裝Release&gt;&gt;</el-button>
			<br>
			<el-button type="primary" @click.native="() => { Script.Install_Release_Debug() }" size="large" round>
				安裝Release(可看log)&gt;&gt;</el-button>
			<br>
			<el-button type="primary" @click.native="() => { Script.Install_B2B() }" size="large" round>
				安裝B2B&gt;&gt;
			</el-button>
			<br>
			<el-button type="primary" @click.native="() => { Script.Install_JM() }" size="large" round>安裝建喵版&gt;&gt;
			</el-button>
			<br>
			<el-button type="primary" @click.native="() => { Script.Install_Store() }" size="large" round>
				APP商店&gt;&gt;
			</el-button>
			<br>
			<el-button type="primary" @click.native="() => { Script.Install_Bowei() }" size="large" round>
				安裝柏威版&gt;&gt;
			</el-button>
			<div>
				<el-button type="warning" @click.native="() => { Script.Install_InternalTest(+input3) }" size="large"
					round>
					前往
				</el-button>
				<el-input v-model="input3" placeholder="Google Play商店(內部測試) 版本號" class="input-with-select"
					style="width:25%; font-size:25px; text-align">
				</el-input>
				Google Play商店(內部測試) 版本號
			</div>
			<br>
			<a href="bjcasino://get/message?ClearAllCache">清空資料&gt;&gt;</a>
			<br><br>
			<a href="bjcasino://get/message?GetOtherUserProfile=100000185">跟建喵做朋友&gt;&gt;</a>
			<br><br>
			<a href="bjcasino://get/message?GetOtherUserProfile=100000157">跟豆豆做朋友&gt;&gt;</a>
			<br><br>
			<a href="bjcasino://get/message?GetOtherUserProfile=100000148">跟柏威做朋友&gt;&gt;</a>
			<br><br>
			<a href="bjcasino://get/message?OnClickChatAndChat=100000157">跟豆豆聊聊天&gt;&gt;</a>
			<br><br>
			<a href="http://org.vicking.bj">Test&gt;&gt;</a>
			<!-- http://220.134.195.1/public/bonus_casino/html5/jianmiau/SD_Casino_Deeplink/apple-app-site-association -->
			<br><br>
		</h1>
	</div>
</template>