import { ExternalLink } from '@tamagui/lucide-icons'
import { Anchor, H2, Paragraph, XStack, YStack, Button,Separator ,ScrollView} from 'tamagui'
import {useAuth, } from "contexts/authcontext"
import { useRouter} from "expo-router"



export default function index() {
  const router = useRouter()
  const redirect = () => {
    router.replace("/login")
  }
  return (
    <YStack f={1} ai="center" pb="$1" gap="$1" px="$5" pt="$4" bg="$background">
      
      <H2 
        ta="center" // Center-align the text
        color="$primary" // Use theme color for heading
        fontSize="$8" // Larger font size for prominence
      >
        Welcome to a Privacy-Focused Messaging App
      </H2>

      <Separator my="$3" color="$borderColor" /> {/* Adds a subtle divider */}
      <ScrollView f={1} px="$5" py="$5">
      <Paragraph 
        size="$4" // Default font size for body text
        ta="justify" // Justify text for clean alignment
        color="$color" // Default color for readability
        lineHeight="$4" // Increase line height for better readability
        maxWidth={"95%"}
        pb="$7"
      >
        In today’s digital landscape, protecting privacy while ensuring ease of use is more important than ever. That’s why we’ve designed an encrypted, privacy-focused chat application that prioritizes security without compromising on simplicity. Our goal is to provide users with a platform where their conversations remain entirely private, safe from surveillance or unauthorized access.
      </Paragraph>

      <Paragraph size="$4" ta="justify" color="$color" lineHeight="$4" maxWidth={"95%"} pb="$7">
        Unlike many messaging apps that collect user data or depend on centralized servers, our application is built with a commitment to transparency and user control. It is fully open-source, meaning anyone can review the code to ensure there are no hidden vulnerabilities or backdoors. This openness fosters trust within the community while encouraging collaboration to continuously improve the platform.
      </Paragraph>

      <Paragraph size="$4" ta="justify" color="$color" lineHeight="$4" maxWidth={"95%"} pb="$7">
        We also understand the growing demand for self-hosting solutions. By making the application self-hostable, we empower users to take complete control of their data. You can set up the application on your own server, ensuring that your messages, metadata, and other sensitive information remain under your control. This eliminates reliance on third-party services and offers a level of privacy and independence unmatched by traditional messaging platforms.
      </Paragraph>

      <Paragraph size="$4" ta="justify" color="$color" lineHeight="$4" maxWidth={"95%"} pb="$7">
        Despite its advanced privacy features, we’ve worked tirelessly to make the application intuitive and user-friendly. We believe privacy shouldn’t come at the expense of convenience. From a clean interface to seamless functionality, everything has been designed with the user in mind.
      </Paragraph>
      
      </ScrollView>
      

      {/* Footer always visible at the bottom */}
      <XStack
        ai="center"
        jc="center"
        fw="wrap"
        gap="$1.5"
        px="$4"
        py="$3"
        bg="$background" // Match background for consistency
        borderTopWidth={1} // Optional: Add a border to distinguish
        borderColor="$borderColor" // Match theme
      >
        <Paragraph fos="$1">By</Paragraph>

        <Paragraph fos="$1" px="$1" py="$0.2" col="$blue10" bg="$blue5">
          Registering
        </Paragraph>

        <Paragraph fos="$1">You agree to 
          <Anchor
          href="login"
          textDecorationLine="none"
          col="$purple10"
          fos="$1"
          px="$2"
          py="$1"
          br="$3"
          bg="$purple5">
            terms and condidtions
          </Anchor>
          </Paragraph>

        <XStack
          ai="center"
          gap="$2"
          px="$1"
          py="$1"
          br="$3"
          
          
        >
          <Paragraph fos="$1">Learn more by visiting our
          <Anchor
          href="https://discord.gg/jhHXGJCqaZ"
          textDecorationLine="none"
          col="$purple10"
          fos="$1"
          px="$2"
          py="$1"
          br="$3"
          bg="$purple5"
          hoverStyle={{ bg: '$purple6' }}
          pressStyle={{ bg: '$purple4' }}
          >
            
            Discord
          </Anchor>
          </Paragraph>
        </XStack>

        
      </XStack>
    </YStack>
  );
}