import React, { FC } from "react"
import { ValidateMessageNewProps } from "./interface"
import { Icon, Text } from "react-native-paper"
import { errorStyles, iconStyles } from './style'
import { View } from "react-native"
export const InvalidMessageNative: FC<ValidateMessageNewProps> = (props) => {
    const { validateMessage } = props;
    return (
        <>
            {typeof validateMessage === "string" && validateMessage.length > 0 && (
            <View style={errorStyles.container}>
                <Icon
                    source="alert-circle"
                    size={iconStyles.size}
                    color={iconStyles.color}
                />
                <Text style={errorStyles.text}>
                    {validateMessage}
                </Text>
            </View>)}
        </>
    )
}