<template>
  <div :class="'button ' + (active ? 'active' : '')" @click="emit('click')">
    {{ text }}
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const emit = defineEmits(['click']);
defineProps({
  active: {
    type: Boolean,
    default: false
  },
  text: {
    type: String,
    default: ''
  }
})
</script>

<style lang="scss" scoped>
.button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;

  min-width: 60px;
  height: 40px;
  background-size: 100% 100%;
  background-image: url('@/assets/images/PlayList/Button3.png');

  &.active {
    background-image: url('@/assets/images/PlayList/Button0.png');
  }
}
</style>
