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


const props = defineProps<{ Script: BJ_Casino_Bot }>()
const SlotScript = new BJ_Casino_Bot_Slot(props.Script);
props.Script.SlotScript = SlotScript;
const IsRatioStop = ref(true)
</script>

<template>
    <div>
        押注:
        <el-select v-model="SlotScript.BetIndex.value" filterable
            @change="(data: any) => { SlotScript.SelectBet(data) }">
            <el-option v-for="(item, index) in SlotScript.BetGroup" :key="item" :label="item" :value="index" />
        </el-select>
        延遲:
        <el-input v-model="SlotScript.SpinDelay.value" :rows="5" style="width:15%;" />秒
        <div>
            <el-checkbox v-model="SlotScript.IsRatioStop.value" size="large" />
            倍率:
            <el-input v-model="SlotScript.RatioStop.value" :rows="5" style="width:15%;" />倍
        </div>
        <div>
            <el-checkbox v-model="SlotScript.IsCountStop.value" size="large" />
            轉數:
            <el-input v-model="SlotScript.CountStop.value" :rows="5" style="width:15%;" />轉
        </div>
        <div>
            <el-button type="success" @click.native="() => { SlotScript.OnclickSpin() }" round
                v-show="!SlotScript.IsSpin.value">
                Spin
            </el-button>
            <el-button type="success" @click.native="() => { SlotScript.OnclickStop() }" round
                v-show="SlotScript.IsSpin.value">
                Stop
            </el-button>
        </div>
    </div>
</template>