import { nestedTabPageScreenOptions } from "@/components/stacks/NestedTabPageStack"; import { useSettings } from "@/utils/atoms/settings"; import { Ionicons } from "@expo/vector-icons"; import { Stack } from "expo-router"; import { Platform } from "react-native"; const DropdownMenu = !Platform.isTV ? require("zeego/dropdown-menu") : null; import { useTranslation } from "react-i18next"; export default function IndexLayout() { const [settings, updateSettings, pluginSettings] = useSettings(); const { t } = useTranslation(); if (!settings?.libraryOptions) return null; return ( !pluginSettings?.libraryOptions?.locked && !Platform.isTV && ( {t("library.options.display")} {t("library.options.display")} updateSettings({ libraryOptions: { ...settings.libraryOptions, display: "row", }, }) } > {t("library.options.row")} updateSettings({ libraryOptions: { ...settings.libraryOptions, display: "list", }, }) } > {t("library.options.list")} {t("library.options.image_style")} updateSettings({ libraryOptions: { ...settings.libraryOptions, imageStyle: "poster", }, }) } > {t("library.options.poster")} updateSettings({ libraryOptions: { ...settings.libraryOptions, imageStyle: "cover", }, }) } > {t("library.options.cover")} { if (settings.libraryOptions.imageStyle === "poster") return; updateSettings({ libraryOptions: { ...settings.libraryOptions, showTitles: newValue === "on" ? true : false, }, }); }} > {t("library.options.show_titles")} { updateSettings({ libraryOptions: { ...settings.libraryOptions, showStats: newValue === "on" ? true : false, }, }); }} > {t("library.options.show_stats")} ), }} /> {Object.entries(nestedTabPageScreenOptions).map(([name, options]) => ( ))} ); }