import { useNavigate } from "@solidjs/router"; import { For, type JSX } from "solid-js"; import { User } from "../../../lib/icons"; import { useAppShellData } from "../../app-shell/data/app-shell.context"; import { getWorkspaceSurfaceRoute } from "../../app-shell/data/workspace-routes"; import { profileMenuSections } from "../../app-shell/data/shell.data"; import styles from "./ProfileMenu.module.scss"; type ProfileMenuProps = { id: string; menuRef?: (element: HTMLDivElement) => void; onSelect: () => void; variant?: "popover" | "workspace"; }; export const ProfileMenu = (props: ProfileMenuProps): JSX.Element => { const variant = props.variant ?? "popover"; const appShellData = useAppShellData(); const navigate = useNavigate(); const activeUserProfile = () => appShellData.activeUserProfile(); const handleSelect = (actionId: string): void => { if (actionId === "account-settings" || actionId === "security" || actionId === "theme-preferences") { navigate(getWorkspaceSurfaceRoute("settings")); } props.onSelect(); }; return ( ); };