// import { createApp } from "vue";
// import Vuelidate from "@vuelidate/core";

// createApp.use(Vuelidate);

import { useVuelidate } from '@vuelidate/core'
// import { required, minLength } from '@vuelidate/validators'

// export default defineNuxtPlugin((nuxtApp) => {
//   nuxtApp.vueApp.use((useVuelidate) => {
// //     // Example of global setup, but typically you'd handle this in the component
// //     const state = reactive({
// //       firstName: ''
// //     })
// //     const rules = {
// //       firstName: {
// //         required,
// //         minLength: minLength(2)
// //       }
// //     }
// //     const v$ = useVuelidate(rules, state)
// //     return v$;
// //     // Return the v$ instance or any other necessary setup
//   })
// })



export default defineNuxtPlugin(nuxtApp => {
  nuxtApp.provide('vuelidate', useVuelidate)
})