<script setup>
import { cn } from "../../../utils/cn";
import FieldError from "./FieldError.vue";
import FieldWarning from "./FieldWarning.vue";
const props = defineProps({
  class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
  errors: { type: Array, required: false },
  warnings: { type: Array, required: false }
});
</script>

<template>
  <div
    v-if="errors && errors.length || warnings && warnings.length"
    data-slot="field-messages"
    :class="cn('absolute left-0 top-full z-10 flex w-full flex-col gap-0.5', props.class)"
  >
    <FieldError :errors="errors ? [...errors] : void 0" />
    <FieldWarning :errors="warnings ? [...warnings] : void 0" />
  </div>
</template>
