import { IMenuDrawerItem } from "@/components/_Interface/types"; import { AccentColor, MainColor } from "@/constants/color-palet"; import { ICON_SIZE_MEDIUM } from "@/constants/constans-value"; import { useAuth } from "@/hooks/use-auth"; import { Ionicons } from "@expo/vector-icons"; export const drawerItemsProfile = ({ id, isAdmin, }: { id: string; isAdmin: boolean; }) => { const { user } = useAuth(); const adminItems: IMenuDrawerItem[] = [ { icon: ( ), label: "Edit profile", path: `/(application)/profile/${id}/edit`, value: "edit-profile", }, { icon: ( ), label: "Ubah foto profile", path: `/(application)/profile/${id}/update-photo`, value: "update-photo", }, { icon: ( ), label: "Ubah latar belakang", path: `/(application)/profile/${id}/update-background`, value: "update-background", }, { icon: ( ), label: "Tambah portofolio", path: `/(application)/portofolio/${id}/create`, value: "create-portofolio", }, { icon: ( ), label: "Daftar Blokir", path: `/(application)/profile/${id}/blocked-list`, value: "blocked-list", }, { icon: ( ), label: "Dashboard Admin", path: `/(application)/admin/dashboard`, value: "dashboard-admin", }, { icon: ( ), label: "Hapus Akun", color: MainColor.red, path: `/(application)/(user)/delete-account?phone=${user?.nomor}`, value: "delete-account", }, { icon: ( ), label: "Keluar", color: MainColor.red, path: "", value: "logout", }, ]; const userItems: IMenuDrawerItem[] = [ { icon: ( ), label: "Edit profile", path: `/(application)/profile/${id}/edit`, value: "edit-profile", }, { icon: ( ), label: "Ubah foto profile", path: `/(application)/profile/${id}/update-photo`, value: "update-photo", }, { icon: ( ), label: "Ubah latar belakang", path: `/(application)/profile/${id}/update-background`, value: "update-background", }, { icon: ( ), label: "Tambah portofolio", path: `/(application)/portofolio/${id}/create`, value: "create-portofolio", }, { icon: ( ), label: "Blocked List", path: `/(application)/profile/${id}/blocked-list`, value: "blocked-list", }, { icon: ( ), label: "Hapus Akun", color: MainColor.red, path: `/(application)/(user)/delete-account?phone=${user?.nomor}`, value: "delete-account", }, { icon: ( ), label: "Keluar", color: MainColor.red, path: "", value: "logout", }, ]; return isAdmin ? adminItems : userItems; };