import { Feather, Ionicons } from "@expo/vector-icons"; import { BottomSheetBackdrop, type BottomSheetBackdropProps, BottomSheetModal, BottomSheetScrollView, } from "@gorhom/bottom-sheet"; import { Image } from "expo-image"; import { forwardRef, useCallback, useImperativeHandle, useRef } from "react"; import { useTranslation } from "react-i18next"; import { Linking, Platform, TouchableOpacity, View } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { Button } from "@/components/Button"; import { Text } from "@/components/common/Text"; import useRouter from "@/hooks/useAppRouter"; import { storage } from "@/utils/mmkv"; export interface IntroSheetRef { present: () => void; dismiss: () => void; } export const IntroSheet = forwardRef((_, ref) => { const bottomSheetRef = useRef(null); const { t } = useTranslation(); const insets = useSafeAreaInsets(); const router = useRouter(); useImperativeHandle(ref, () => ({ present: () => { storage.set("hasShownIntro", true); bottomSheetRef.current?.present(); }, dismiss: () => { bottomSheetRef.current?.dismiss(); }, })); const renderBackdrop = useCallback( (props: BottomSheetBackdropProps) => ( ), [], ); const handleDismiss = useCallback(() => { bottomSheetRef.current?.dismiss(); }, []); const handleGoToSettings = useCallback(() => { bottomSheetRef.current?.dismiss(); router.push("/settings"); }, []); return ( {t("home.intro.welcome_to_streamyfin")} {t("home.intro.a_free_and_open_source_client_for_jellyfin")} {t("home.intro.features_title")} {t("home.intro.features_description")} Jellyseerr {t("home.intro.jellyseerr_feature_description")} {!Platform.isTV && ( <> {t("home.intro.downloads_feature_title")} {t("home.intro.downloads_feature_description")} Chromecast {t("home.intro.chromecast_feature_description")} )} {t("home.intro.centralised_settings_plugin_title")} {t( "home.intro.centralised_settings_plugin_description", )}{" "} { Linking.openURL( "https://github.com/streamyfin/jellyfin-plugin-streamyfin", ); }} > {t("home.intro.read_more")} {t("home.intro.go_to_settings_button")} ); }); IntroSheet.displayName = "IntroSheet";