<script setup lang="ts">
import { useColorOrPastel, type ColorProps, type PastelProps } from '~/composables/colors'

const props = defineProps<ColorProps | PastelProps>()
const color = useColorOrPastel(() => props.color, 'secondary')
</script>

<template>
  <button class="funkwhale is-colored pill" :class="[color]">
    <div v-if="!!$slots.image" class="pill-image">
      <slot name="image" />
    </div>
    <div class="pill-content">
      <slot />
    </div>
  </button>
</template>

<style lang="scss">
@import './pill.scss';
</style>
