import mitt from "mitt"; type Events = { toast: {message:string, type:ToastTypeEnum, title: string|null}; }; const emitter = mitt(); const $bus = { $on: emitter.on, $emit: emitter.emit, }; export type $Bus = typeof $bus; export default defineNuxtPlugin((nuxtApp) => { nuxtApp.provide("bus", $bus); });