<script setup lang="ts">import { BJ_Casino_Bot } from '../script/BJ_Casino_Bot';
import { BJ_Casino_Bot_Lobby } from '../script/BJ_Casino_Bot_Lobby';


const props = defineProps<{ Client: any, Script: BJ_Casino_Bot }>()
const LobbyScript = new BJ_Casino_Bot_Lobby(props.Script);
props.Script.LobbyScript = LobbyScript;
</script>

<template>
    <div>
        廳別:
        <el-select v-model="LobbyScript.LobbyDefault.value" filterable
            @change="(data: any) => { LobbyScript.SelectLobby(data) }">
            <el-option v-for="(item, index) in LobbyScript.GetLobby()" :key="item.value" :label="item.label"
                :value="item.value" />
        </el-select>
    </div>
    <div>
        機台:
        <el-input v-model="LobbyScript.InputSlot.value" style="width:20%;" />
        桌號:{{ LobbyScript.Table }}
    </div>
    <div>
        <el-button type="success"
            @click.native="() => { LobbyScript.OnclickSlotIn(LobbyScript.Lobby.value, +LobbyScript.InputSlot.value) }"
            round v-show="!LobbyScript.IsSlotIn.value">
            確定
        </el-button>
        <el-button type="success" @click.native="() => { LobbyScript.OnclickSlotOut() }" round
            v-show="LobbyScript.IsSlotIn.value">
            離開
        </el-button>
    </div>
</template>