<template>
  <div
    class="base-element-enjoy"
    :style="{
      top: elementInfo.top + 'px',
      left: elementInfo.left + 'px',
      width: elementInfo.width + 'px',
      height: elementInfo.height + 'px'
    }"
  >
    <div class="rotate-wrapper" :style="{ transform: `rotate(${elementInfo.rotate}deg)` }">
      <div class="element-content">
        <enjoyPlayer :elementInfo="elementInfo" :isBase="true" />
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import type { PPTEnjoyElement } from "@/types/slides"
import enjoyPlayer from "./enjoyPlayer.vue"

defineProps<{
  elementInfo: PPTEnjoyElement
}>()
</script>

<style lang="scss" scoped>
.base-element-enjoy {
  position: absolute;
}
.rotate-wrapper {
  width: 100%;
  height: 100%;
}
.element-content {
  width: 100%;
  height: 100%;
  position: relative;
}
</style>
