import Link from "next/link";
import { DashboardIcon, HomeIcon, TableIcon } from "../../icons/sidebar-icon";
import { useSidebar } from "./sidebar-context";
import { Tooltip } from "@nextui-org/react";
export default function ClosedSidebarIcon(props: {
icon: string;
isActive: boolean;
childMenu: any;
path: string;
title: string;
}) {
const { isOpen, toggleSidebar } = useSidebar();
const { icon, isActive, childMenu, path, title } = props;
const renderIcon = () => {
switch (icon) {
case "dashboard":
return ;
case "menu1":
return ;
case "table":
return ;
default:
return null; // Tidak ada ikon yang sesuai
}
};
return (
{childMenu.length < 1 ? (
{renderIcon()}
) : (
{renderIcon()}
)}
);
}