2022-07-31 14:39:35 -05:00
|
|
|
import { Plugin } from "@nuxt/types";
|
2022-08-13 21:38:26 -08:00
|
|
|
import { Auth } from "@nuxtjs/auth-next";
|
2022-07-31 14:39:35 -05:00
|
|
|
import { Framework } from "vuetify";
|
2022-10-22 11:51:07 -08:00
|
|
|
import { icons } from "~/lib/icons";
|
|
|
|
import { Icon } from "~/lib/icons/icon-type";
|
2021-05-23 12:38:55 -08:00
|
|
|
|
2022-01-09 07:15:23 +01:00
|
|
|
interface Globals {
|
|
|
|
icons: Icon;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module "vue/types/vue" {
|
|
|
|
interface Vue {
|
|
|
|
$globals: Globals;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module "@nuxt/types" {
|
|
|
|
interface Context {
|
|
|
|
$globals: Globals;
|
2022-07-31 14:39:35 -05:00
|
|
|
$vuetify: Framework;
|
2022-08-13 21:38:26 -08:00
|
|
|
$auth: Auth;
|
2022-01-09 07:15:23 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const globalsPlugin: Plugin = (_, inject) => {
|
|
|
|
inject("globals", {
|
2022-07-31 14:39:35 -05:00
|
|
|
icons,
|
2022-01-09 07:15:23 +01:00
|
|
|
});
|
2021-05-23 12:38:55 -08:00
|
|
|
};
|
2022-01-09 07:15:23 +01:00
|
|
|
|
2022-07-31 14:39:35 -05:00
|
|
|
export default globalsPlugin;
|