import { AlertDefaultSystem, BackButton, DotButton, DrawerCustom, MenuDrawerDynamicGrid, ViewWrapper, } from "@/components"; import { IconEdit } from "@/components/_Icon"; import { MainColor } from "@/constants/color-palet"; import { ICON_SIZE_SMALL } from "@/constants/constans-value"; import Investment_BoxDetailDocument from "@/screens/Invesment/Document/RecapBoxDetail"; import { AntDesign, Ionicons } from "@expo/vector-icons"; import { router, Stack, useLocalSearchParams } from "expo-router"; import { useState } from "react"; export default function InvestmentRecapOfDocument() { const { id } = useLocalSearchParams(); const [openDrawer, setOpenDrawer] = useState(false); const [openDrawerBox, setOpenDrawerBox] = useState(false); return ( <> , headerRight: () => ( { setOpenDrawer(true); setOpenDrawerBox(false); }} /> ), }} /> {Array.from({ length: 10 }).map((_, index) => ( setOpenDrawerBox(true)} /> } href={`/(file)/${id}`} /> ))} {/* Drawer On Header */} setOpenDrawer(false)} height={"auto"} > ), label: "Tambah Dokumen", path: `/investment/${id}/(document)/add-document`, }, ]} onPressItem={(item) => { router.push(item.path as any); setOpenDrawer(false); }} /> {/* Drawer On Box */} setOpenDrawerBox(false)} height={"auto"} > , label: "Edit Dokumen", path: `/investment/${id}/(document)/edit-document`, }, { icon: ( ), label: "Hapus Dokumen", path: "" as any, color: MainColor.red, }, ]} onPressItem={(item) => { if (item.path === ("" as any)) { AlertDefaultSystem({ title: "Hapus Dokumen", message: "Apakah anda yakin ingin menghapus dokumen ini?", textLeft: "Batal", textRight: "Hapus", onPressRight: () => { setOpenDrawerBox(false); }, }); } router.push(item.path as any); setOpenDrawer(false); }} /> ); }