<template>
  <component :is="$attrs.href ? 'a' : 'button'" :type="$attrs.href ? null : 'button'"
    :class="getModifiersClass('o-button', modifiers)" v-bind="$attrs">
    <slot />
  </component>
</template>

<script setup lang="ts">
import type { ModifierItems } from './button.config';
import useComponentModifiers from '../../composable/useComponentModifiers';

defineProps<{
  modifiers?: ModifierItems;
}>();

const { getModifiersClass } = useComponentModifiers();
</script>