| 
									
										
										
										
											2022-07-31 14:39:35 -05:00
										 |  |  | import { Plugin } from "@nuxt/types"; | 
					
						
							| 
									
										
										
										
											2023-11-05 19:07:02 -06:00
										 |  |  | import { Auth as NuxtAuth } from "@nuxtjs/auth-next"; | 
					
						
							| 
									
										
										
										
											2022-07-31 14:39:35 -05:00
										 |  |  | import { Framework } from "vuetify"; | 
					
						
							| 
									
										
										
										
											2023-11-05 19:07:02 -06:00
										 |  |  | import { UserOut } from "~/lib/api/types/user"; | 
					
						
							| 
									
										
										
										
											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" { | 
					
						
							| 
									
										
										
										
											2023-11-05 19:07:02 -06:00
										 |  |  |   // @ts-ignore https://github.com/nuxt-community/auth-module/issues/1097#issuecomment-840249428
 | 
					
						
							|  |  |  |   interface Auth extends NuxtAuth { | 
					
						
							|  |  |  |     user: UserOut | null; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  |   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; |