<!--
* @FileDescription: 批注
* @Author: 黄琪勇
* @Date:2024-04-06 18:40:23
-->
<template>
   <el-dialog modal-class="penModalClass" class="penElDialog" :class="{ isWhite: isWhite }" v-bind="$attrs" :fullscreen="true" :show-close="false">
      <iframe class="penIframe" frameborder="0" :src="URL_WHITEBOARD"></iframe>
      <div class="closeSvg" @click="close">
         <svg width="22px" height="20px" viewBox="0 0 22 20">
            <path
               transform="translate(-1.000000, -2.000000)"
               fill="#FFFFFF"
               d="M13,2 C13.5522847,2 14,2.44771525 14,3 C14,3.51283584 13.6139598,3.93550716 13.1166211,3.99327227 L13,4 L3,4 L3,20 L13,20 C13.5128358,20 13.9355072,20.3860402 13.9932723,20.8833789 L14,21 C14,21.5128358 13.6139598,21.9355072 13.1166211,21.9932723 L13,22 L2,22 C1.48716416,22 1.06449284,21.6139598 1.00672773,21.1166211 L1,21 L1,3 C1,2.48716416 1.38604019,2.06449284 1.88337887,2.00672773 L2,2 L13,2 Z M17.7071068,7.05025253 L21.9497475,11.2928932 L21.9497475,11.2928932 C22.3402718,11.6834175 22.3402718,12.3165825 21.9497475,12.7071068 L17.7071068,16.9497475 C17.3165825,17.3402718 16.6834175,17.3402718 16.2928932,16.9497475 C15.9023689,16.5592232 15.9023689,15.9260582 16.2928932,15.5355339 L18.828,12.999 L9.29368112,13 C8.74139637,13 8.29368112,12.5522847 8.29368112,12 C8.29368112,11.4871642 8.67972131,11.0644928 9.17706,11.0067277 L9.29368112,11 L18.827,10.999 L16.2928932,8.46446609 C15.9023689,8.0739418 15.9023689,7.44077682 16.2928932,7.05025253 C16.6834175,6.65972824 17.3165825,6.65972824 17.7071068,7.05025253 Z"
            />
         </svg>
      </div>
   </el-dialog>
</template>

<script setup lang="ts">
import { URL_WHITEBOARD } from "@/config/index"
defineProps<{
   isWhite?: boolean
   close: () => void
}>()
</script>
<style lang="scss">
.penElDialog.el-dialog {
   padding: 0;
   background-color: initial;
   &.isWhite {
      background-color: #fff;
   }
   .el-dialog__header {
      padding: 0;
   }
   .el-dialog__body {
      width: 100%;
      height: 100%;
      .penIframe {
         display: block;
         width: 100%;
         height: 100%;
      }
   }
}
.penModalClass.el-overlay {
   background-color: initial;
   .closeSvg {
      position: absolute;
      right: 15px;
      bottom: 0;
      width: 50px;
      height: 54px;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 10;
   }
}
</style>
