import React from 'react' import {ScrollView, View} from 'react-native' import {ViewHeader} from '../com/util/ViewHeader' import {ThemeProvider, PaletteColorName} from 'lib/ThemeContext' import {usePalette} from 'lib/hooks/usePalette' import {s} from 'lib/styles' import {displayNotification} from 'lib/notifee' import {Text} from '../com/util/text/Text' import {ViewSelector} from '../com/util/ViewSelector' import {EmptyState} from '../com/util/EmptyState' import * as LoadingPlaceholder from '../com/util/LoadingPlaceholder' import {Button, ButtonType} from '../com/util/forms/Button' import {DropdownButton, DropdownItem} from '../com/util/forms/DropdownButton' import {ToggleButton} from '../com/util/forms/ToggleButton' import {RadioGroup} from '../com/util/forms/RadioGroup' import {ErrorScreen} from '../com/util/error/ErrorScreen' import {ErrorMessage} from '../com/util/error/ErrorMessage' const MAIN_VIEWS = ['Base', 'Controls', 'Error', 'Notifs'] export const 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 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 trigger = () => { displayNotification( 'Paul Frazee liked your post', "Hello world! This is a test of the notifications card. The text is long to see how that's handled.", ) } return (