import { Button, Text, View, YStack, XStack, isWeb, Paragraph, H3, InfoCard, AnimatePresence, ScrollView, } from '@my/ui' import { ArrowLeft, Camera, Check } from '@tamagui/lucide-icons' import { CameraDemo } from 'app/assets/camera-demo' import { JunwonLogoIcon } from 'app/assets/icon' import { getServerAddress } from 'app/utils/getServerAddress' import { useState } from 'react' import { useRouter } from 'solito/router' import { z } from 'zod' const formFields = [ { id: 'email', label: 'Email', placeholder: 'junwon@junwon.com' }, { id: 'age', label: 'Age', placeholder: '28', keyboardType: 'numeric', maxLength: 2 }, { id: 'location', label: 'Location (State if in USA | Country if not)', placeholder: 'California (or Spain)', }, ] export const CameraScreen = () => { const router = useRouter() const [showTikTok, setShowTikTok] = useState(false) const [showInstagram, setShowInstagram] = useState(false) const [showYouTube, setShowYouTube] = useState(false) const [showAgeWarning, setShowAgeWarning] = useState(false) const [formSubmitted, setFormSubmitted] = useState(false) const [validationErrors, setValidationErrors] = useState>({}) const [isSubmitting, setIsSubmitting] = useState(false) const [submitError, setSubmitError] = useState(null) const formDataSchema = z.object({ email: z.string().email('* Email: We cannot reach you at the email address you provided.'), age: z.string().refine( (val) => { const num = parseInt(val, 10) return num >= 13 && num <= 99 }, { message: '* Age: We are not able to provide service to people below 13 years old or above 99 years old.', } ), location: z .string() .min( 1, '* Location: We need to know where you are in order to determine whether and when we can invite you.' ), tiktokHandle: z.string().optional(), instagramHandle: z.string().optional(), youtubeHandle: z.string().optional(), }) type FormData = z.infer & { [key: string]: string | undefined } const [formData, setFormData] = useState({ email: '', age: '', location: '', tiktokHandle: '', instagramHandle: '', youtubeHandle: '', }) const infoCards = [ { kind: 'body_of_post' as const, title: 'Live Stream with AI Viewers', contents: [ 'Junwon Camera app is a magical new way to interact with advanced AIs: via a live camera stream! Enrich your days with AI viewers at just $7 for 7 days.', ], }, { kind: 'body_of_post' as const, title: 'Listen to Humanity', contents: [ 'AIs have seen the entire internet. Show them what you are doing, and hear ideas that practically come from the collective wisdom of the entire humanity.', ], }, { kind: 'body_of_post' as const, title: 'Captivate Followers', contents: [ "Turn on Junwon Camera to turn your ordinary days into extraordinary contents. Eating lunch? Now it's a Mukbang. Post that video on YT, IG, TT, and catch attention.", ], }, ] const cardTitleStyle = isWeb ? { fontFamily: 'Spline+Sans', fontWeight: 500, } : { fontFamily: 'SplineSansMedium' } return ( Already have access? Open Junwon Camera