<template>
  <t-dialog
    :footer="false"
    @close="closeDialog"
    placement="center"
    :visible="confirmDialog"
    :draggable="true"
    class="hierarchy-dialog"
    ><template #body>
      <div class="body-box">
        <span class="title">
          <slot name="header">确定提现？</slot>
        </span>
        <div class="comfim-box">
          <t-button @click="comfimawalY">
            <slot name="comfirm">{{ $t('user.Confirm') }}</slot>
          </t-button>
          <t-button @click="closeDialog">
            <slot name="close">{{ $t('user.Cancel') }}</slot>
          </t-button>
        </div>
      </div>
    </template>
  </t-dialog>
</template>

<script lang="ts" setup>
const props = defineProps({
  confirmDialog: Boolean,
});
const emit = defineEmits(['closeComfrimDialog', 'comfimawal']);
// 取消
const closeDialog = () => {
  emit('closeComfrimDialog', false);
};
// 确认
const comfimawalY = () => {
  emit('comfimawal', true);
};
</script>

<style lang="less" scoped>
// 红点
@import '@/style/components/dot.less';
// 第二层dialog的蒙层颜色
@import '@/style/components/hierarchyDialog.less';
@import '@/style/variables.less';
@import '@/style/flex.less';
.hierarchy-dialog {
  :deep(.t-dialog) {
    padding: 12px;
    width: 340px;
  }
  .body-box {
    text-align: center;
    .title {
      font-size: @font-size-l;
      font-weight: bold;
    }
    .comfim-box {
      padding-top: 30px;
      .t-button {
        margin: 0 30px;
      }
    }
  }
}
</style>
