import Styles from "@/constants/Styles";
import React from "react";
import { Dimensions, Text, View } from "react-native";
import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel";
import PaperGridContent from "../paperGridContent";

export default function DivisionHome() {
   const data = [...new Array(6).keys()];
   const ref = React.useRef<ICarouselInstance>(null);
   const width = Dimensions.get("window").width;


   return (
      <View style={[Styles.mb15]}>
         <Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Divisi Teraktif</Text>
         <Carousel
            ref={ref}
            width={width}
            height={235}
            data={data}
            loop={true}
            autoPlay={false}
            autoPlayReverse={false}
            pagingEnabled={true}
            snapEnabled={true}
            vertical={false}
            renderItem={({ index }) => (
               <PaperGridContent content="carousel" title="Kesekretariatan" headerColor="warning">
                  <View>
                     <Text style={{ fontSize: 50, textAlign: "center", fontWeight: 'bold' }}>12</Text>
                     <Text style={[Styles.textSubtitle, { textAlign: "center" }]}>KEGIATAN</Text>
                  </View>
               </PaperGridContent>
            )}
         />
      </View>
   )
}