<template>
  <v-chip
    :color="color"
    :size="size"
    :variant="variant"
    :prepend-icon="icon"
  >
    {{ label }}
  </v-chip>
</template>

<script setup>
import { computed } from 'vue'
import { platformColor, platformIcon, platformLabel } from '../../utils/platformColor.js'

const props = defineProps({
  platform: { type: String, required: true },
  size: { type: String, default: 'small' },
  variant: { type: String, default: 'tonal' },
})

const color = computed(() => platformColor(props.platform))
const icon = computed(() => platformIcon(props.platform))
const label = computed(() => platformLabel(props.platform))
</script>
