<template>
  <div class="tag-layer" @click.stop>
    <div class="tag-header">
      <span> </span>
      <ui-icon class="close" @click.stop="close" type="player_close"></ui-icon>
    </div>
    <div class="linkcon">
      <div class="linkbody">
        <iframe :src="customLink.value" frameborder="0"></iframe>
      </div>
    </div>
  </div>
</template>

<script setup>
import { reactive, defineEmits, onBeforeMount, onMounted, ref, watchEffect, computed, watch, nextTick } from "vue";
import { useStore } from "vuex";
const store = useStore();

const metadata = computed(() => store.getters["scene/metadata"]);

const customLink = computed(() => store.getters["scene/customLink"]);


const close = () => {
  store.commit("functions/setShowLink", false);
};

</script>

<style lang="scss" scoped>
.tag-layer {
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  top: 0;
  position: fixed;
  left: 0;
  background: rgba(27, 27, 28, 0.8);
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);

  .tag-header {
    display: flex;
    width: 100%;
    padding: 0 20px;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    height: 50px;
    border-bottom: solid 1px rgba(255, 255, 255, 0.16);

    .close {
      color: rgba(255, 255, 255, 0.6);
      z-index: 999;
    }
  }

  .linkcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100vh - 100px);
    padding: 20px;
    .linkbody {
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 1);
      border-radius: 2px;
      color: #fff;
      >iframe {
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>