<template>
  <div class="mask" v-if="visibile">
    <div class="comfirm-container">
      <svg-icon name="info" size="94" />
      <div>{{ msg }}</div>
      <div class="btns">
        <CommonButton size="default" type="danger" :msg="btn_msg" @click="emit('confirm')"></CommonButton>
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  visibile: {
    type: Boolean,
    default: false
  },
  msg: {
    type: String,
    default: ''
  },
  btn_msg: {
    type: String,
    default: '确定'
  }
});
const emit = defineEmits(['cancel', 'confirm']);
</script>
<style lang="less" scoped>
.mask {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  background: rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  .comfirm-container {
    width: 720px;
    height: 552px;
    background: #f8f8f8;
    box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16);
    border-radius: 8px 8px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 36px;
    padding: 70px 80px;
    justify-content: space-between;
    text-align: center;
    .btns {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-around;
    }
  }
}
</style>
