| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  | <template> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |   <v-app dark> | 
					
						
							| 
									
										
										
										
											2025-06-20 18:04:45 +02:00
										 |  |  |     <NuxtPwaManifest /> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     <TheSnackbar /> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     <AppHeader> | 
					
						
							|  |  |  |       <v-btn | 
					
						
							|  |  |  |         icon | 
					
						
							|  |  |  |         @click.stop="sidebar = !sidebar" | 
					
						
							|  |  |  |       > | 
					
						
							|  |  |  |         <v-icon> {{ $globals.icons.menu }}</v-icon> | 
					
						
							|  |  |  |       </v-btn> | 
					
						
							|  |  |  |     </AppHeader> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     <AppSidebar | 
					
						
							|  |  |  |       v-model="sidebar" | 
					
						
							|  |  |  |       absolute | 
					
						
							|  |  |  |       :top-link="topLinks" | 
					
						
							|  |  |  |       :secondary-links="cookbookLinks || []" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       :bottom-links="bottomLinks" | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     > | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       <v-menu | 
					
						
							|  |  |  |         offset-y | 
					
						
							|  |  |  |         nudge-bottom="5" | 
					
						
							|  |  |  |         close-delay="50" | 
					
						
							|  |  |  |         nudge-right="15" | 
					
						
							|  |  |  |       > | 
					
						
							|  |  |  |         <template #activator="{ props }"> | 
					
						
							|  |  |  |           <v-btn | 
					
						
							|  |  |  |             v-if="isOwnGroup" | 
					
						
							|  |  |  |             rounded | 
					
						
							|  |  |  |             size="large" | 
					
						
							|  |  |  |             class="ml-2 mt-3" | 
					
						
							|  |  |  |             v-bind="props" | 
					
						
							|  |  |  |             variant="elevated" | 
					
						
							|  |  |  |             elevation="2" | 
					
						
							|  |  |  |             :color="$vuetify.theme.current.dark ? 'background-lighten-1' : 'background-darken-1'" | 
					
						
							|  |  |  |           > | 
					
						
							|  |  |  |             <v-icon | 
					
						
							|  |  |  |               start | 
					
						
							|  |  |  |               size="large" | 
					
						
							|  |  |  |               color="primary" | 
					
						
							|  |  |  |             > | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |               {{ $globals.icons.createAlt }} | 
					
						
							|  |  |  |             </v-icon> | 
					
						
							|  |  |  |             {{ $t("general.create") }} | 
					
						
							|  |  |  |           </v-btn> | 
					
						
							|  |  |  |         </template> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         <v-list | 
					
						
							|  |  |  |           density="comfortable" | 
					
						
							|  |  |  |           class="mb-0 mt-1 py-0" | 
					
						
							|  |  |  |           variant="flat" | 
					
						
							|  |  |  |         > | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |           <template v-for="(item, index) in createLinks"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |             <div | 
					
						
							|  |  |  |               v-if="!item.hide" | 
					
						
							|  |  |  |               :key="item.title" | 
					
						
							|  |  |  |             > | 
					
						
							|  |  |  |               <v-divider | 
					
						
							|  |  |  |                 v-if="item.insertDivider" | 
					
						
							|  |  |  |                 :key="index" | 
					
						
							|  |  |  |                 class="mx-2" | 
					
						
							|  |  |  |               /> | 
					
						
							|  |  |  |               <v-list-item | 
					
						
							|  |  |  |                 v-if="!item.restricted || isOwnGroup" | 
					
						
							|  |  |  |                 :key="item.title" | 
					
						
							|  |  |  |                 :to="item.to" | 
					
						
							|  |  |  |                 exact | 
					
						
							|  |  |  |                 class="my-1" | 
					
						
							|  |  |  |               > | 
					
						
							|  |  |  |                 <template #prepend> | 
					
						
							|  |  |  |                   <v-icon | 
					
						
							|  |  |  |                     size="40" | 
					
						
							|  |  |  |                     :icon="item.icon" | 
					
						
							|  |  |  |                   /> | 
					
						
							|  |  |  |                 </template> | 
					
						
							|  |  |  |                 <v-list-item-title class="font-weight-medium" style="font-size: small;"> | 
					
						
							|  |  |  |                   {{ item.title }} | 
					
						
							|  |  |  |                 </v-list-item-title> | 
					
						
							|  |  |  |                 <v-list-item-subtitle class="font-weight-medium" style="font-size: small;"> | 
					
						
							|  |  |  |                   {{ item.subtitle }} | 
					
						
							|  |  |  |                 </v-list-item-subtitle> | 
					
						
							|  |  |  |             </v-list-item> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |             </div> | 
					
						
							|  |  |  |           </template> | 
					
						
							|  |  |  |         </v-list> | 
					
						
							|  |  |  |       </v-menu> | 
					
						
							|  |  |  |       <template #bottom> | 
					
						
							|  |  |  |         <v-list-item @click.stop="languageDialog = true"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           <template #prepend> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |             <v-icon>{{ $globals.icons.translate }}</v-icon> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           </template> | 
					
						
							|  |  |  |           <v-list-item-title>{{ $t("sidebar.language") }}</v-list-item-title> | 
					
						
							|  |  |  |           <LanguageDialog v-model="languageDialog" /> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         </v-list-item> | 
					
						
							|  |  |  |         <v-list-item @click="toggleDark"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           <template #prepend> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |             <v-icon> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |               {{ $vuetify.theme.current.dark ? $globals.icons.weatherSunny : $globals.icons.weatherNight }} | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |             </v-icon> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           </template> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |           <v-list-item-title> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |             {{ $vuetify.theme.current.dark ? $t("settings.theme.light-mode") : $t("settings.theme.dark-mode") }} | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |           </v-list-item-title> | 
					
						
							|  |  |  |         </v-list-item> | 
					
						
							|  |  |  |       </template> | 
					
						
							|  |  |  |     </AppSidebar> | 
					
						
							| 
									
										
										
										
											2025-06-28 15:59:58 +02:00
										 |  |  |     <v-main class="pt-12"> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |       <v-scroll-x-transition> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         <div> | 
					
						
							|  |  |  |           <NuxtPage /> | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |       </v-scroll-x-transition> | 
					
						
							|  |  |  |     </v-main> | 
					
						
							|  |  |  |   </v-app> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							|  |  |  | import { useLoggedInState } from "~/composables/use-logged-in-state"; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  | import type { SideBarLink } from "~/types/application-types"; | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  | import { useAppInfo } from "~/composables/api"; | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  | import { useCookbookPreferences } from "~/composables/use-users/preferences"; | 
					
						
							| 
									
										
										
										
											2025-06-24 02:36:40 -05:00
										 |  |  | import { useCookbookStore, usePublicCookbookStore } from "~/composables/store/use-cookbook-store"; | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  | import { useHouseholdStore, usePublicHouseholdStore } from "~/composables/store/use-household-store"; | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  | import { useToggleDarkMode } from "~/composables/use-utils"; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  | import type { ReadCookBook } from "~/lib/api/types/cookbook"; | 
					
						
							|  |  |  | import type { HouseholdSummary } from "~/lib/api/types/household"; | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  | export default defineNuxtComponent({ | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |   setup() { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const i18n = useI18n(); | 
					
						
							|  |  |  |     const { $globals, $vuetify } = useNuxtApp(); | 
					
						
							|  |  |  |     const $auth = useMealieAuth(); | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     const { isOwnGroup } = useLoggedInState(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const isAdmin = computed(() => $auth.user.value?.admin); | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     const route = useRoute(); | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || ""); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |     const cookbookPreferences = useCookbookPreferences(); | 
					
						
							| 
									
										
										
										
											2025-06-24 02:36:40 -05:00
										 |  |  |     const { store: cookbooks, actions: cookbooksActions } = isOwnGroup.value ? useCookbookStore() : usePublicCookbookStore(groupSlug.value || ""); | 
					
						
							|  |  |  |     onMounted(() => { | 
					
						
							|  |  |  |       if (!cookbooks.value.length) { | 
					
						
							|  |  |  |         cookbooksActions.refresh(); | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |     const { store: households } = isOwnGroup.value ? useHouseholdStore() : usePublicHouseholdStore(groupSlug.value || ""); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const householdsById = computed(() => { | 
					
						
							|  |  |  |       return households.value.reduce((acc, household) => { | 
					
						
							|  |  |  |         acc[household.id] = household; | 
					
						
							|  |  |  |         return acc; | 
					
						
							|  |  |  |       }, {} as { [key: string]: HouseholdSummary }); | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     const appInfo = useAppInfo(); | 
					
						
							|  |  |  |     const showImageImport = computed(() => appInfo.value?.enableOpenaiImageServices); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const toggleDark = useToggleDarkMode(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const languageDialog = ref<boolean>(false); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const sidebar = ref<boolean>(false); | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     onMounted(() => { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       sidebar.value = $vuetify.display.mdAndUp.value; | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |     function cookbookAsLink(cookbook: ReadCookBook): SideBarLink { | 
					
						
							|  |  |  |       return { | 
					
						
							|  |  |  |         key: cookbook.slug || "", | 
					
						
							|  |  |  |         icon: $globals.icons.pages, | 
					
						
							|  |  |  |         title: cookbook.name, | 
					
						
							|  |  |  |         to: `/g/${groupSlug.value}/cookbooks/${cookbook.slug || ""}`, | 
					
						
							|  |  |  |         restricted: false, | 
					
						
							|  |  |  |       }; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const currentUserHouseholdId = computed(() => $auth.user.value?.householdId); | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |     const cookbookLinks = computed<SideBarLink[]>(() => { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       const sortedCookbooks = [...cookbooks.value].sort((a, b) => (a.position || 0) - (b.position || 0)); | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |       const ownLinks: SideBarLink[] = []; | 
					
						
							|  |  |  |       const links: SideBarLink[] = []; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       const cookbooksByHousehold = sortedCookbooks.reduce((acc, cookbook) => { | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |         const householdName = householdsById.value[cookbook.householdId]?.name || ""; | 
					
						
							|  |  |  |         if (!acc[householdName]) { | 
					
						
							|  |  |  |           acc[householdName] = []; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         acc[householdName].push(cookbook); | 
					
						
							|  |  |  |         return acc; | 
					
						
							|  |  |  |       }, {} as Record<string, ReadCookBook[]>); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       Object.entries(cookbooksByHousehold).forEach(([householdName, cookbooks]) => { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         if (!cookbooks.length) { | 
					
						
							|  |  |  |           return; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |         if (cookbooks[0].householdId === currentUserHouseholdId.value) { | 
					
						
							|  |  |  |           ownLinks.push(...cookbooks.map(cookbookAsLink)); | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         } | 
					
						
							|  |  |  |         else { | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |           links.push({ | 
					
						
							|  |  |  |             key: householdName, | 
					
						
							|  |  |  |             icon: $globals.icons.book, | 
					
						
							|  |  |  |             title: householdName, | 
					
						
							|  |  |  |             children: cookbooks.map(cookbookAsLink), | 
					
						
							|  |  |  |             restricted: false, | 
					
						
							|  |  |  |           }); | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  |       }); | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |       links.sort((a, b) => a.title.localeCompare(b.title)); | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       if ($auth.user.value && cookbookPreferences.value.hideOtherHouseholds) { | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |         return ownLinks; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       } | 
					
						
							|  |  |  |       else { | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |         return [...ownLinks, ...links]; | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const createLinks = computed(() => [ | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |       { | 
					
						
							|  |  |  |         insertDivider: false, | 
					
						
							|  |  |  |         icon: $globals.icons.link, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("general.import"), | 
					
						
							|  |  |  |         subtitle: i18n.t("new-recipe.import-by-url"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         to: `/g/${groupSlug.value}/r/create/url`, | 
					
						
							|  |  |  |         restricted: true, | 
					
						
							|  |  |  |         hide: false, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         insertDivider: false, | 
					
						
							|  |  |  |         icon: $globals.icons.fileImage, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("recipe.create-from-image"), | 
					
						
							|  |  |  |         subtitle: i18n.t("recipe.create-recipe-from-an-image"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         to: `/g/${groupSlug.value}/r/create/image`, | 
					
						
							|  |  |  |         restricted: true, | 
					
						
							|  |  |  |         hide: !showImageImport.value, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         insertDivider: true, | 
					
						
							|  |  |  |         icon: $globals.icons.edit, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("general.create"), | 
					
						
							|  |  |  |         subtitle: i18n.t("new-recipe.create-manually"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         to: `/g/${groupSlug.value}/r/create/new`, | 
					
						
							|  |  |  |         restricted: true, | 
					
						
							|  |  |  |         hide: false, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     ]); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const bottomLinks = computed<SideBarLink[]>(() => | 
					
						
							|  |  |  |       isAdmin.value | 
					
						
							|  |  |  |         ? [ | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |               icon: $globals.icons.cog, | 
					
						
							|  |  |  |               title: i18n.t("general.settings"), | 
					
						
							|  |  |  |               to: "/admin/site-settings", | 
					
						
							|  |  |  |               restricted: true, | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |           ] | 
					
						
							|  |  |  |         : [], | 
					
						
							|  |  |  |     ); | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-05 13:57:30 -06:00
										 |  |  |     const topLinks = computed<SideBarLink[]>(() => [ | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.silverwareForkKnife, | 
					
						
							|  |  |  |         to: `/g/${groupSlug.value}`, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("general.recipes"), | 
					
						
							| 
									
										
										
										
											2024-12-03 07:27:41 -06:00
										 |  |  |         restricted: false, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.search, | 
					
						
							|  |  |  |         to: `/g/${groupSlug.value}/recipes/finder`, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("recipe-finder.recipe-finder"), | 
					
						
							| 
									
										
										
										
											2024-12-03 07:27:41 -06:00
										 |  |  |         restricted: false, | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.calendarMultiselect, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("meal-plan.meal-planner"), | 
					
						
							| 
									
										
										
										
											2024-08-22 10:14:32 -05:00
										 |  |  |         to: "/household/mealplan/planner/view", | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         restricted: true, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.formatListCheck, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("shopping-list.shopping-lists"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         to: "/shopping-lists", | 
					
						
							|  |  |  |         restricted: true, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.timelineText, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("recipe.timeline"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         to: `/g/${groupSlug.value}/recipes/timeline`, | 
					
						
							|  |  |  |         restricted: true, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.book, | 
					
						
							|  |  |  |         to: `/g/${groupSlug.value}/cookbooks`, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("cookbook.cookbooks"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         restricted: true, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.organizers, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         title: i18n.t("general.organizers"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |         restricted: true, | 
					
						
							|  |  |  |         children: [ | 
					
						
							|  |  |  |           { | 
					
						
							|  |  |  |             icon: $globals.icons.categories, | 
					
						
							|  |  |  |             to: `/g/${groupSlug.value}/recipes/categories`, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |             title: i18n.t("sidebar.categories"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |             restricted: true, | 
					
						
							|  |  |  |           }, | 
					
						
							|  |  |  |           { | 
					
						
							|  |  |  |             icon: $globals.icons.tags, | 
					
						
							|  |  |  |             to: `/g/${groupSlug.value}/recipes/tags`, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |             title: i18n.t("sidebar.tags"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |             restricted: true, | 
					
						
							|  |  |  |           }, | 
					
						
							|  |  |  |           { | 
					
						
							|  |  |  |             icon: $globals.icons.potSteam, | 
					
						
							|  |  |  |             to: `/g/${groupSlug.value}/recipes/tools`, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |             title: i18n.t("tool.tools"), | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |             restricted: true, | 
					
						
							|  |  |  |           }, | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     ]); | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-17 17:07:01 -05:00
										 |  |  |     return { | 
					
						
							|  |  |  |       groupSlug, | 
					
						
							|  |  |  |       cookbookLinks, | 
					
						
							|  |  |  |       createLinks, | 
					
						
							|  |  |  |       bottomLinks, | 
					
						
							|  |  |  |       topLinks, | 
					
						
							|  |  |  |       isOwnGroup, | 
					
						
							|  |  |  |       languageDialog, | 
					
						
							|  |  |  |       toggleDark, | 
					
						
							|  |  |  |       sidebar, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | </script> |