| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  | import { fieldTypes } from "../forms"; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  | import type { AutoFormItems } from "~/types/auto-forms"; | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | export const useCommonSettingsForm = () => { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |   const i18n = useI18n(); | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |   const commonSettingsForm: AutoFormItems = [ | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       section: i18n.t("profile.group-settings"), | 
					
						
							|  |  |  |       label: i18n.t("group.enable-public-access"), | 
					
						
							|  |  |  |       hint: i18n.t("group.enable-public-access-description"), | 
					
						
							|  |  |  |       varName: "makeGroupRecipesPublic", | 
					
						
							|  |  |  |       type: fieldTypes.BOOLEAN, | 
					
						
							|  |  |  |       rules: ["required"], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       section: i18n.t("data-pages.data-management"), | 
					
						
							|  |  |  |       label: i18n.t("user-registration.use-seed-data"), | 
					
						
							|  |  |  |       hint: i18n.t("user-registration.use-seed-data-description"), | 
					
						
							|  |  |  |       varName: "useSeedData", | 
					
						
							|  |  |  |       type: fieldTypes.BOOLEAN, | 
					
						
							|  |  |  |       rules: ["required"], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   ]; | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |   return { | 
					
						
							|  |  |  |     commonSettingsForm, | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | }; |