import * as React from 'react';
import { View, Button, Pressable, Text } from 'react-native';
import { useTranslation } from 'react-i18next';
import { HomeScreenProps } from '../types';
import CircularPanel from '../components/CircularPanel';
import { SvgXml } from 'react-native-svg';
import helpSvg from '../svg/help';
import { getColorByBrightness } from "@mancala/core";
export function HomeScreen({ navigation, route }: HomeScreenProps) {
const { context } = route.params;
const { t } = useTranslation();
const textColorOnAppBar = getColorByBrightness(
context.themeManager.theme.appBarBgColor,
context.themeManager.theme.textColor,
context.themeManager.theme.textLightColor
);
const updateHeaderButton = () => {
navigation.setOptions({
headerRight: () => (
{
navigation.push("Help", { context })
}}>
),
});
}
React.useEffect(() => {
updateHeaderButton();
}, []);
return (
navigation.replace('Loby', { context })}>
{t('NewGame')}} />
);
}