<template>
  <div class="Invited-table">
    <t-dialog
      :footer="false"
      @close="closeInvitedDialog"
      placement="center"
      :visible="InvitedVisible"
      :draggable="true"
      class="Invited-dialog"
    >
      <template #header>
        <h2>奖励领取</h2>
      </template>
      <template #body>
        <div class="center-box">
          <div>
            <span>当前返佣金额：</span>
            <span>---</span>
          </div>
          <t-button
            class="custom_button_back_border"
            @click="confirmDialog = true"
            >提现</t-button
          >
        </div>
        <t-divider :dashed="true" />
        <span class="dot-title"
          ><div class="dot-box"></div>
          注意！请务必看此说明，返佣金额达到----以上才能解锁
          提现功能，提现为一次性，列入当前返佣金额为----，点
          击提现则全部提现。提现的金额则会发送到您当前连接的 钱包内。</span
        >
      </template>
    </t-dialog>
    <comfirmDialog
      :confirmDialog="confirmDialog"
      @comfimawal="comfimawal"
      @closeComfrimDialog="closeComfrimDialog"
    >
    </comfirmDialog>
  </div>
</template>

<script lang="ts" setup>
const props = defineProps({
  InvitedVisible: Boolean,
});
const confirmDialog = ref(false);
const emit = defineEmits(['closeInvitedDialog']);
const closeInvitedDialog = () => {
  emit('closeInvitedDialog', false);
};
// 关闭确认对话框
const closeComfrimDialog = (value: boolean) => {
  confirmDialog.value = value;
};
// 确定提现
const comfimawal = (value: boolean) => {
  if (value) {
    console.log(11);
    confirmDialog.value = false;
  }
};
</script>

<style lang="less" scoped>
// 红点
@import '@/style/components/dot.less';
// 第二层dialog的蒙层颜色
@import '@/style/components/hierarchyDialog.less';
@import '@/style/variables.less';
@import '@/style/flex.less';
.Invited-table {
  .Invited-dialog {
    :deep(.t-dialog__wrap) {
      .t-dialog {
        width: 600px;
      }
    }
    .center-box {
      .dja(space-between,center);
      width: 100%;
    }
    .dot-title {
      line-height: 30px;
    }
    .dot-box {
      display: inline-block;
    }
  }
}
</style>
