<template>
  <label v-if="labelText" :for="labelText" :class="getModifiersClass('o-label', modifiers)">{{ labelText }}</label>
  <textarea :id="labelText ? labelText : undefined" :class="getModifiersClass('o-textarea', modifiers)"
    v-bind="$attrs"></textarea>
</template>

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

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

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