'use client' import React, { useRef } from 'react' import { useRouter } from 'next/navigation' import { useHover } from 'ahooks' import s from './style.module.css' import cn from '@/utils/classnames' import ItemOperation from '@/app/components/explore/item-operation' import AppIcon from '@/app/components/base/app-icon' import type { AppIconType } from '@/types/app' export type IAppNavItemProps = { isMobile: boolean name: string id: string icon_type: AppIconType | null icon: string icon_background: string icon_url: string isSelected: boolean isPinned: boolean togglePin: () => void uninstallable: boolean onDelete: (id: string) => void } export default function AppNavItem({ isMobile, name, id, icon_type, icon, icon_background, icon_url, isSelected, isPinned, togglePin, uninstallable, onDelete, }: IAppNavItemProps) { const router = useRouter() const url = `/explore/installed/${id}` const ref = useRef(null) const isHovering = useHover(ref) return (