<template>
  <div class="mobileScreen" @click="toolVisible = false">
    <template v-if="!initLoading">
      <Screen />
      <!-- <MobileThumbnails v-if="toolVisible" class="thumbnails" />
      <IconListView class="tool-icon" @click.stop="toolVisible = !toolVisible" /> -->
    </template>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue"
import Screen from "../Screen/index.vue"
import usePptWork from "@/store/pptWork"
import { useScreenStore } from "@/store"
import MobileThumbnails from "../Mobile/MobileThumbnails.vue"

const screenStore = useScreenStore()

const initLoading = ref(true)
const toolVisible = ref(false)

const usePptWorkHook = usePptWork()

screenStore.setScreenMode("mobileScreen")
// 初始化 ppt数据
usePptWorkHook.initPPTData().then(() => {
  initLoading.value = false
})
</script>

<style lang="scss" scoped>
.mobileScreen {
  width: 100%;
  height: 100%;
  .thumbnails {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 99;
    background-color: rgba($color: #1d1d1d, $alpha: 0.7);
    overflow: auto !important;
    animation: slideInUp 0.15s;
  }

  @keyframes slideInUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
  .tool-icon {
    position: fixed;
    bottom: 8px;
    right: 8px;
    font-size: 25px;
    color: #666;
    z-index: 10;
  }
}
</style>
