import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { useTheme } from "@/providers/ThemeProvider";
import { AntDesign } from "@expo/vector-icons";
import Text from "./Text";
import { View } from "react-native";

type Props = {
   text?: string,
   title?: string
}

export default function SectionCancel({ text, title }: Props) {
   const { colors } = useTheme();

   return (
      <View style={[Styles.p10, Styles.round05, Styles.mb15, { backgroundColor: colors.error + '70' }]}>
         <View style={[Styles.rowItemsCenter]}>
            <AntDesign name="warning" size={22} style={[Styles.mr10]} color={colors.text} />
            <Text style={[Styles.textDefaultSemiBold]}>{title ? title : 'Kegiatan Dibatalkan'}</Text>
         </View>
         {
            text && (
               <View>
                  <Text style={[Styles.mt05]}>{text}</Text>
               </View>
            )
         }
      </View>
   )
}