import React from 'react';
import {StatusBar} from 'react-native';
import Animated from 'react-native-reanimated';
import {Content, Cover, TabsGradient} from '../../components';
import {RouteProp} from '@react-navigation/native';
import {ProfileStackParams} from '../../routes/profile';

/**
 * Profile Screen for a user's profile
 * including posts, messaging, and settings
 */

type ProfileScreenRouteProps = RouteProp<ProfileStackParams, 'Profile'>;

interface ProfileOnboardingProps {
  route: ProfileScreenRouteProps;
}

const ProfileScreen: React.FC<ProfileOnboardingProps> = ({route}) => {
  const {isProfileView} = route.params;
  const y = Animated.useValue(0);
  return (
    <>
      <StatusBar />
      <Cover {...{y, isProfileView}} />
      <Content {...{y, isProfileView}} />
      <TabsGradient />
    </>
  );
};

export default ProfileScreen;
