import React, { useEffect, FunctionComponent, useContext } from 'react';
import { View, ViewStyle } from 'react-native';
import styles from './ForumUserClassBadgeStyles';
import useForumUserClassBadgeTranslation from './ForumUserClassBadgeTranslation'
import { PixelStyles } from 'react-native-pixel-styles';
import { PixelwolfText } from 'react-native-pixel-components';
import { PixelForumUser } from '../../Model/PixelForumUser';

interface IProps {
    // Props type definition
    style?: ViewStyle | ViewStyle[]
    user: PixelForumUser
}

interface IState {
    // State type definition
}

export const ForumUserClassBadge: FunctionComponent<IProps> = (props) => {

    const { I18n } = useForumUserClassBadgeTranslation()
    const themeStore = useContext(PixelStyles.pixelThemeStoreContext)

    const initialState: IState = {
    };

    // ComponentDidMount
    useEffect(() => {
        return () => {
            //ComponentDidUnmount
        }
    }, [])

    return (
        <View style={[styles.centeredRow, styles.leftAlignedRow, props.style]} >
            <PixelwolfText weight={'bold'} size={'c13'} color={themeStore.theme.darkGrayColor}>
                {(I18n.translation.Class + ' ' + 1).toLocaleUpperCase()}
            </PixelwolfText>
        </View>
    );
};
