import { Text, View } from "react-native";
import React from "react";
import { commonStyles } from "../../../styles/commonStyle";
import { external } from "../../../styles/externalStyle";
import { useValues } from "@src/utils/context/index";
import { AuthTextProps } from "../type";
import { appFonts, fontSizes, windowHeight } from "@src/themes";

export function AuthText({ title, subtitle, isShow }: AuthTextProps) {
  const { textColorStyle, textRTLStyle } = useValues();

  return (
    <View>
      <Text
        style={[
          commonStyles.regularTextBigBlack,
          { color: textColorStyle },
          { textAlign: "center" },
          { marginTop: windowHeight(18) },
        ]}
      >
        {title}
      </Text>
      {isShow ? null : (
        <Text
          style={[
            commonStyles.regularText,
            external.pt_8,
            { textAlign: "center" },
            { fontFamily: appFonts.medium, fontSize: fontSizes.FONT18 },
          ]}
        >
          {subtitle}
        </Text>
      )}
    </View>
  );
}
