<!-- TODO: Is not documented on the website -->
<template>
  <div :class="getModifiersClass('c-form-element-group', modifiers)">
    <slot />
    <span v-if="position" :class="`c-form-element-group__${position} icon-${icon}`">
    </span>
  </div>
</template>

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

defineProps<{
  position?: 'prepend' | 'append';
  icon?: string;
  modifiers?: ModifierItems;
}>();

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