<template>
  <button 
    class="fullscreen-button" 
    :class="`fullscreen-button--${clientType}`"
    @click="handleClick"
    title="全屏"
  >
    <img 
      :src="fullscreenIcon" 
      class="fullscreen-button__icon" 
      alt="全屏" 
    />
  </button>
</template>

<script setup lang="ts">
import fullscreenIcon from '../assets/fullscreen-icon.svg'

interface Props {
  clientType?: 'pc' | 'mobile' | 'ipad'
}

withDefaults(defineProps<Props>(), {
  clientType: 'pc'
})

const emit = defineEmits<{
  click: []
}>()

const handleClick = () => {
  emit('click')
}
</script>

<style scoped>
.fullscreen-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
}

.fullscreen-button:hover {
    background: rgba(0, 0, 0, 0.4);
}

.fullscreen-button__icon {
    display: block;
}

/* PC 端样式 */
.fullscreen-button--pc {
    padding: 6px;
}

.fullscreen-button--pc .fullscreen-button__icon {
    width: 16px;
    height: 16px;
}

/* iPad 样式 */
.fullscreen-button--ipad {
    padding: 6px;
}

.fullscreen-button--ipad .fullscreen-button__icon {
    width: 16px;
    height: 16px;
}

/* 移动端样式 */
.fullscreen-button--mobile {
   padding: 6px;
}

.fullscreen-button--mobile .fullscreen-button__icon {
    width: 16px;
    height: 16px;
}
</style>
