import {
AlertDefaultSystem,
DrawerCustom,
GridComponentView,
MenuDrawerDynamicGrid,
StackCustom,
TextCustom,
} from "@/components";
import DrawerAdmin from "@/components/Drawer/DrawerAdmin";
import NavbarMenu from "@/components/Drawer/NavbarMenu";
import { AccentColor, MainColor } from "@/constants/color-palet";
import {
ICON_SIZE_MEDIUM,
ICON_SIZE_SMALL,
ICON_SIZE_XLARGE,
} from "@/constants/constans-value";
import { useAuth } from "@/hooks/use-auth";
import { adminListMenu } from "@/screens/Admin/listPageAdmin";
import { GStyles } from "@/styles/global-styles";
import { FontAwesome6, Ionicons } from "@expo/vector-icons";
import { router, Stack } from "expo-router";
import { useState } from "react";
export default function AdminLayout() {
const [openDrawerNavbar, setOpenDrawerNavbar] = useState(false);
const [openDrawerUser, setOpenDrawerUser] = useState(false);
const { logout } = useAuth();
return (
<>
(
setOpenDrawerNavbar(true)}
/>
),
headerRight: () => (
setOpenDrawerUser(true)}
/>
),
}}
>
{/* ================== Investment Start ================== */}
{/* ================== Investment End ================== */}
{/* ================== Maps Start ================== */}
{/* ================== Maps End ================== */}
{/* ================== App Information Start ================== */}
{/* ================== App Information End ================== */}
{/* ================== Job Start ================== */}
{/*
*/}
{/* ================== Collaboration Start ================== */}
{/* ================== Collaboration End ================== */}
{/* ================== Forum Start ================== */}
{/* ================== Forum End ================== */}
{/* ================== Voting Start ================== */}
{/* ================== Voting End ================== */}
{/* ================== Event Start ================== */}
{/*
*/}
{/* ================== Event End ================== */}
{/* ================== Donasi Start ================== */}
{/* */}
{/* */}
{/*
*/}
{/* ================== Donasi End ================== */}
setOpenDrawerNavbar(false)}
>
setOpenDrawerNavbar(false)}
style={{ alignSelf: "flex-end" }}
/>
setOpenDrawerNavbar(false)}
/>
setOpenDrawerUser(false)}
height={"auto"}
>
}
>
Username
}
>
User Role
),
path: "/admin/notification",
},
{
label: "Kembali ke User",
value: "back-to-user",
icon: (
),
path: "" as any,
},
{
label: "Keluar",
value: "logout",
icon: (
),
path: "" as any,
color: MainColor.red,
},
]}
onPressItem={(item) => {
if (item.value === "notification") {
router.push("/admin/notification");
setOpenDrawerUser(false);
} else if (item.value === "back-to-user") {
AlertDefaultSystem({
title: "Kembali ke User",
message: "Apakah Anda yakin ingin kembali ke user?",
textLeft: "Batal",
textRight: "Ya",
onPressRight: () => {
router.replace(`/(application)/(user)/profile/${123}`);
},
});
} else if (item.value === "logout") {
AlertDefaultSystem({
title: "Keluar",
message: "Apakah Anda yakin ingin keluar?",
textLeft: "Batal",
textRight: "Keluar",
onPressRight: () => {
logout();
},
});
}
}}
/>
>
);
}