import type { NativeStackNavigationOptions } from '@react-navigation/native-stack' import { Image, Pressable, StyleSheet, Text, View } from 'react-native' // import React from 'react' // import { Platform, ScrollView, StatusBar, useWindowDimensions } from 'react-native' // import { useSafeAreaInsets } from 'react-native-safe-area-context' // import { useExpoRouter } from '../global-state/router-store' // import { router } from '../imperative-api' // import { Link } from '../link/Link' // import { matchDeepDynamicRouteName } from '../matchers' // import { RouteNode } from '../Route' const INDENT = 24 export function getNavOptions(): NativeStackNavigationOptions { return { title: 'sitemap', headerShown: false, presentation: 'modal', animation: 'default', headerLargeTitle: false, headerTitleStyle: { color: 'white', }, headerTintColor: 'white', headerLargeTitleStyle: { color: 'white', }, headerStyle: { backgroundColor: 'black', // @ts-expect-error: mistyped borderBottomColor: '#323232', }, } } export function Sitemap() { return sitemap!!!!!!!!! // const { top, bottom } = useSafeAreaInsets() // const { width } = useWindowDimensions() // return ( // // // // // // // // // ) // } // function FileSystemView() { // const routes = useExpoRouter().getSortedRoutes() // return ( // <> // {routes.map((child) => ( // // // // ))} // // ) // } // function FileItem({ // route, // level = 0, // parents = [], // isInitial = false, // }: { // route: RouteNode // level?: number // parents?: string[] // isInitial?: boolean // }) { // const disabled = route.children.length > 0 // const segments = React.useMemo( // () => [...parents, ...route.route.split('/')], // [parents, route.route] // ) // const href = React.useMemo(() => { // return ( // '/' + // segments // .map((v) => { // // add an extra layer of entropy to the url for deep dynamic routes // if (matchDeepDynamicRouteName(v)) { // return v + '/' + Date.now() // } // // index must be erased but groups can be preserved. // return v === 'index' ? '' : v // }) // .filter(Boolean) // .join('/') // ) // }, [segments, route.route]) // const filename = React.useMemo(() => { // const segments = route.contextKey.split('/') // // join last two segments for layout routes // if (route.contextKey.match(/_layout\.[jt]sx?$/)) { // return segments[segments.length - 2] + '/' + segments[segments.length - 1] // } // const segmentCount = route.route.split('/').length // // Join the segment count in reverse order // // This presents files without layout routes as children with all relevant segments. // return segments.slice(-segmentCount).join('/') // }, [route]) // const info = isInitial ? 'Initial' : route.generated ? 'Virtual' : '' // return ( // <> // {!route.internal && ( // { // if (Platform.OS !== 'web' && router.canGoBack()) { // // Ensure the modal pops // router.back() // } // }} // style={{ flex: 1, display: 'flex' }} // disabled={disabled} // asChild // // Ensure we replace the history so you can't go back to this page. // replace // > // // {({ pressed, hovered }) => ( // // // {route.children.length ? : } // {filename} // // // {!!info && ( // // {info} // // )} // {!disabled && } // // // )} // // // )} // {route.children.map((child) => ( // // ))} // // ) } // function FileIcon() { // return // } // function PkgIcon() { // return // } // function ForwardIcon() { // return // } const styles = StyleSheet.create({ container: { backgroundColor: 'black', flex: 1, alignItems: 'stretch', }, main: { marginHorizontal: 'auto', flex: 1, alignItems: 'stretch', }, scroll: { paddingHorizontal: 12, // flex: 1, // paddingTop: top + 12, alignItems: 'stretch', }, itemContainer: { borderWidth: 1, borderColor: '#323232', borderRadius: 19, marginBottom: 12, overflow: 'hidden', }, itemPressable: { paddingHorizontal: INDENT, paddingVertical: 16, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', }, filename: { color: 'white', fontSize: 20, marginLeft: 12 }, virtual: { textAlign: 'right', color: 'white' }, image: { width: 24, height: 24, resizeMode: 'contain' }, })