<script setup>
/**
 * Reusable form wrapper: prevents default submit and emits submit event.
 * Consistent layout class (flex flex-col gap-8). Use for page forms.
 */
const props = defineProps({
  class: { type: [String, Object, Array], default: "flex flex-col gap-8" },
});

const emit = defineEmits(["submit"]);

function onSubmit(e) {
  emit("submit", e);
}
</script>

<template>
  <form :class="props['class']" novalidate @submit.prevent="onSubmit">
    <slot />
  </form>
</template>
