import Styles from "@/constants/Styles";
import { useTheme } from "@/providers/ThemeProvider";
import { TouchableOpacity } from "react-native";
import Text from './Text';

type Props = {
   text: string;
   onPress: () => void;
   disabled?: boolean
};

export function ButtonForm({ text, onPress, disabled }: Props) {
   const { colors } = useTheme();
   return (
      <TouchableOpacity style={[Styles.btnRound, Styles.round05, Styles.mt30, { backgroundColor: colors.primary }, disabled && { backgroundColor: colors.tabIconDefault }]} onPress={onPress} disabled={disabled}>
         <Text style={[Styles.textDefaultSemiBold, Styles.cWhite]}>{text}</Text>
      </TouchableOpacity>
   );
}