import React from 'react';
import {useNavigation} from '@react-navigation/native';
import {Text, View, StyleSheet, ScrollView, SafeAreaView} from 'react-native';
import Header from '../../../components/Header/Header';
import Button from '../../../components/Button';
import R from '../../../assets/R';
import ItemNav from './item';
import {CERTIFICATEREGISTRATION} from '../../../routers/ScreenNames';
import styles from '../style';
const ListCetificateView = props => {
  const {} = props;
  const navigate = useNavigation();

  const renderBody = () => {
    return (
      <ScrollView style={styles.box}>
        <View style={styles.container_header}>
          <Text style={[styles.text, {fontWeight:'800',fontSize:R.fontsize.fontsSize14} ]}>Các chứng chỉ đã đăng kí</Text>
          <Button
            onPress={() => navigate.navigate(CERTIFICATEREGISTRATION)}
            height={30}
            borderRadius={10}
            textColor={R.colors.white}
            fontFamily={R.fonts.InterRegular}
            fontWeight={300}
            fontSize={R.fontsize.fontsSize12}
            iconSpacingLeft={2}
            paddingHorizontal={10}
            icon={R.images.icPlus}
            backgroundColor={R.colors.blue500}
            title={'Thêm mới'}
          />
        </View>
        <View style={styles.container_item}>
          <ItemNav />
        </View>
      </ScrollView>
    );
  };
  return (
    <View style={{flex: 1}}>
      <Header isBack={true} isSearch={true} title={'Danh sách chứng chỉ'} />
      {renderBody()}
    </View>
  );
};

export default ListCetificateView;
