<!--  -->
<template>
  <div>
    <CtDialog
      :visible="payDialog"
      :widthType="3"
      titleClass="text-h6"
      title="确认支付"
      :footer="false"
      submitText="确认"
      @paySuccess="paySuccess"
      @close="handleClose"
    >
      <pay
        ref="payRef"
        v-bind="$attrs"
        @payTypeChange="null"
      ></pay>
    </CtDialog>
  </div>
</template>

<script setup>
defineOptions({name: 'pay-confirmPaymentDialog'})
import pay from './index.vue'
import { ref } from 'vue'

const emit = defineEmits(['close', 'paySuccess'])

const payDialog = ref(false)
setTimeout(() => {
  payDialog.value = true
}, 500)

const handleClose = () => {
  payDialog.value = false
  emit('close')
}
const paySuccess = () => {
  payDialog.value = false
  emit('paySuccess')
}
</script>
<style lang="scss" scoped>
</style>
