| 
									
										
										
										
											2022-06-03 20:12:32 -08:00
										 |  |  | export interface ContextMenuItem { | 
					
						
							|  |  |  |   title: string; | 
					
						
							|  |  |  |   icon: string; | 
					
						
							|  |  |  |   event: string; | 
					
						
							|  |  |  |   color?: string; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-12 12:59:28 -08:00
										 |  |  | export interface ContextMenuPresets { | 
					
						
							|  |  |  |   delete: ContextMenuItem; | 
					
						
							|  |  |  |   edit: ContextMenuItem; | 
					
						
							|  |  |  |   save: ContextMenuItem; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export function useContextPresets(): ContextMenuPresets { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |   const i18n = useI18n(); | 
					
						
							|  |  |  |   const { $globals } = useNuxtApp(); | 
					
						
							| 
									
										
										
										
											2022-06-03 20:12:32 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   return { | 
					
						
							|  |  |  |     delete: { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       title: i18n.t("general.delete"), | 
					
						
							| 
									
										
										
										
											2022-06-03 20:12:32 -08:00
										 |  |  |       icon: $globals.icons.delete, | 
					
						
							|  |  |  |       event: "delete", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     edit: { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       title: i18n.t("general.edit"), | 
					
						
							| 
									
										
										
										
											2022-06-03 20:12:32 -08:00
										 |  |  |       icon: $globals.icons.edit, | 
					
						
							|  |  |  |       event: "edit", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     save: { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       title: i18n.t("general.save"), | 
					
						
							| 
									
										
										
										
											2022-06-03 20:12:32 -08:00
										 |  |  |       icon: $globals.icons.save, | 
					
						
							|  |  |  |       event: "save", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |