import Styles from "@/constants/Styles";
import { useTheme } from "@/providers/ThemeProvider";
import { AntDesign } from "@expo/vector-icons";
import { router } from "expo-router";
import { useState } from "react";
import { View } from "react-native";
import ButtonMenuHeader from "../buttonMenuHeader";
import DrawerBottom from "../drawerBottom";
import MenuItemRow from "../menuItemRow";

export default function HeaderRightBannerList() {
   const [isVisible, setVisible] = useState(false)
   const { colors } = useTheme()
   return (
      <>
         <ButtonMenuHeader onPress={() => { setVisible(true) }} />
         <DrawerBottom animation="slide" isVisible={isVisible} setVisible={() => setVisible(false)} title="Menu">
            <View style={Styles.rowItemsCenter}>
               <MenuItemRow
                  icon={<AntDesign name="pluscircle" color={colors.text} size={25} />}
                  title="Tambah Banner"
                  onPress={() => {
                     setVisible(false)
                     router.push('/banner/create')
                  }}
               />
            </View>
         </DrawerBottom>
      </>
   )
}