import React from 'react';
import Icon from 'react-native-vector-icons/FontAwesome5';
import {createMaterialTopTabNavigator} from 'react-navigation-tabs';
import {View, Text, TouchableOpacity, Platform} from 'react-native';
import {Fonts} from '../assets/styles/fonts-theme';
import {colors} from '../assets/styles/colors-theme';
import Global from '../services/Global';
import history from '../common/history';
import News from '../pages/news/news';
import Property from '../pages/property/property';
import Repair from '../pages/repair/repair';

export const TopTab = createMaterialTopTabNavigator(
  {
    News: {
      screen: News,
    },
    Repair: {screen: Repair},
    Property: {screen: Property},
  },
  {
    tabBarPosition: 'top',
    swipeEnabled: true,
    animationEnabled: true,
    tabBarOptions: {
      activeTintColor: 'black',
      inactiveTintColor: 'black',
      style: {
        backgroundColor:'white',
        ...Platform.select({
          ios: {},
          android: {
            height: 80,
          },
        }),
      },
      labelStyle: {
        textAlign: 'center',
        fontFamily: Fonts.ubuntu,
        ...Platform.select({
          ios: {},
          android: {
            marginTop: 30,
          },
        }),
      },
      indicatorStyle: {
        borderBottomColor: colors.mainColor,
        borderBottomWidth: 3,
      },
    },
  },
);
