import { inject } from 'vue' import { UseEventBusReturn } from '@vueuse/core' import { FormEvent } from '../types' export const useFormEvents = () => { const formBus = inject | undefined>('form-events', undefined) const formPath = inject('form-path', undefined) const emitFormBlur = () => { if (formBus && formPath) { formBus.emit({ type: 'blur', path: formPath }) } } return { emitFormBlur } }