import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { Pressable, Text, View } from "react-native";

type Props = {
   content: 'carousel' | 'page';
   children: React.ReactNode;
   title: string
   headerColor: 'primary' | 'warning'
   onPress?: () => void
   contentPosition?: 'top' | 'center'
};
export default function PaperGridContent({ content, children, title, headerColor, onPress, contentPosition }: Props) {
   return (
      <Pressable onPress={onPress}>
         <View style={[content == 'carousel' ? Styles.wrapGridCaraousel : Styles.wrapGridContent, headerColor == 'warning' ? ColorsStatus.warning : ColorsStatus.primary]}>
            <View style={[Styles.headerPaperGrid]}>
               <Text style={[Styles.textSubtitle, headerColor == 'warning' ? Styles.cDefault : Styles.cWhite]}>{title}</Text>
            </View>
            <View style={[contentPosition && contentPosition == 'top' ? Styles.contentPaperGrid2 : Styles.contentPaperGrid]}>
               {children}
            </View>
         </View>
      </Pressable>

   )
}