import { createURL, type CreateURLParams } from "@/functions/zipline/urls"; import { styles } from "@/styles/components/shareIntentShorten"; import { Text, View, ToastAndroid } from "react-native"; import { useShareIntent } from "@/hooks/useShareIntent"; import TextInput from "@/components/TextInput"; import * as Clipboard from "expo-clipboard"; import { useAuth } from "@/hooks/useAuth"; import Button from "@/components/Button"; import { useRouter } from "expo-router"; import { useState } from "react"; interface Props { defaultUrl: string; } export default function ShareIntentShorten({ defaultUrl }: Props) { const router = useRouter(); useAuth(); const resetShareIntent = useShareIntent(true); const [url, setUrl] = useState(defaultUrl); const [vanity, setVanity] = useState(null); const [maxViews, setMaxViews] = useState(null); const [password, setPassword] = useState(null); const [outputUtl, setOutputUrl] = useState(null); const [error, setError] = useState(); const urlRegex = /^http:\/\/(.*)?|https:\/\/(.*)?$/; return ( Shorten URL