import * as React from "react"; import { View } from "react-native"; import { Button } from "~/components/ui/button"; import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "~/components/ui/card"; import { Input } from "~/components/ui/input"; import { Label } from "~/components/ui/label"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs"; import { Text } from "~/components/ui/text"; import { ArrowLeftIcon, CircleDollarSign, LucideEye, } from "lucide-react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { useTranslation } from "react-i18next"; import ModalToast from "~/components/ui/toast"; export default function Forgot() { const [value, setValue] = React.useState("phone"); const { t } = useTranslation(); const [toastVisible, setToastVisible] = React.useState(false); const [toastTitle, setToastTitle] = React.useState(""); const [toastDescription, setToastDescription] = React.useState< string | undefined >(undefined); const [toastVariant, setToastVariant] = React.useState< "success" | "error" | "warning" | "info" >("info"); const toastTimeoutRef = React.useRef | null>( null ); const showToast = ( title: string, description?: string, variant: "success" | "error" | "warning" | "info" = "info" ) => { if (toastTimeoutRef.current) { clearTimeout(toastTimeoutRef.current); } setToastTitle(title); setToastDescription(description); setToastVariant(variant); setToastVisible(true); toastTimeoutRef.current = setTimeout(() => { setToastVisible(false); toastTimeoutRef.current = null; }, 2500); }; React.useEffect(() => { return () => { if (toastTimeoutRef.current) { clearTimeout(toastTimeoutRef.current); } }; }, []); return ( {t("forgot.headerTitle")} {" "} {t("forgot.title")} {t("forgot.description")} {t("forgot.tabsPhone")} {t("forgot.tabsEmail")} {/* Add a international phone selector here */} ); }