import { View, Text } from "react-native-ui-lib";
import React from "react";
import { useAuthContext } from "@/contexts/AuthContext";

const HeaderTemplate = (props: {
  message: string;
  isWelcome: boolean;
  children?: React.ReactNode;
  link?: React.ReactNode;
}) => {
  const { user, profileData } = useAuthContext();
  return (
    <View row centerV padding-25>
      <View
        backgroundColor="pink"
        height={65}
        width={65}
        style={{ borderRadius: 22 }}
        marginR-20
      />
      <View>
        {props.isWelcome && (
          <Text text70L>Welcome, {profileData?.firstName}!</Text>
        )}
        <Text text70BL>{props.message}</Text>
        {props.children && <View>{props.children}</View>}
        {props.link && <View>{props.link}</View>}
      </View>
    </View>
  );
};

export default HeaderTemplate;
