import React from 'react' import {ScrollView, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {usePalette} from '#/lib/hooks/usePalette' import { type CommonNavigatorParams, type NativeStackScreenProps, } from '#/lib/routes/types' import {s} from '#/lib/styles' import {type PaletteColorName, ThemeProvider} from '#/lib/ThemeContext' import {EmptyState} from '#/view/com/util/EmptyState' import {ErrorMessage} from '#/view/com/util/error/ErrorMessage' import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {Button} from '#/view/com/util/forms/Button' import {ToggleButton} from '#/view/com/util/forms/ToggleButton' import * as LoadingPlaceholder from '#/view/com/util/LoadingPlaceholder' import {Text} from '#/view/com/util/text/Text' import * as Toast from '#/view/com/util/Toast' import {ViewHeader} from '#/view/com/util/ViewHeader' import {ViewSelector} from '#/view/com/util/ViewSelector' import * as Layout from '#/components/Layout' const MAIN_VIEWS = ['Base', 'Controls', 'Error', 'Notifs'] export const DebugScreen = ({}: NativeStackScreenProps< CommonNavigatorParams, 'Debug' >) => { const [colorScheme, setColorScheme] = React.useState<'light' | 'dark'>( 'light', ) const onToggleColorScheme = () => { setColorScheme(colorScheme === 'light' ? 'dark' : 'light') } return ( ) } function DebugInner({ colorScheme, onToggleColorScheme, }: { colorScheme: 'light' | 'dark' onToggleColorScheme: () => void }) { const [currentView, setCurrentView] = React.useState(0) const pal = usePalette('default') const {_} = useLingui() const renderItem = (item: any) => { return ( {item.currentView === 3 ? ( ) : item.currentView === 2 ? ( ) : item.currentView === 1 ? ( ) : ( )} ) } const items = [{currentView}] return ( ) } function Heading({label}: {label: string}) { const pal = usePalette('default') return ( {label} ) } function BaseView() { return ( ) } function ControlsView() { return ( ) } function ErrorView() { return ( {}} /> {}} /> {}} numberOfLines={1} /> ) } function NotifsView() { const triggerPush = () => { // TODO: implement local notification for testing } const triggerToast = () => { Toast.show('The task has been completed') } const triggerToast2 = () => { Toast.show('The task has been completed successfully and with no problems') } return (