import type { HTMLProps, ReactNode } from 'react';
export type TSidebarMenuItem = {
/** Set the menu / sub-menu's label */
label: ReactNode;
/** Set the menu / sub-menu's active state */
isActive?: boolean;
};
export type TMenu = {
/** Set the initial open or close state of the menu with sub-menu. The default behaviour for the collapsible menu is being collapsed */
initOpen?: boolean;
} & TSidebarMenuItem;
export type TSidebarMenu = {
/** Set the main-menu */
menu: TMenu;
/** Set the sub-menu. If the menu has sub-menu, it can be expanded and collapsed to show or hide the sub-menu */
subMenu?: TSidebarMenuItem[];
};
export type TSidebarProps = {
/** Set the Sidebar's menu list */
listMenu: TSidebarMenu[];
} & HTMLProps;
export type TSidebarMenuProps = {
/** Set the Sidebar's menu */
menu: TSidebarMenu;
} & HTMLProps;
export type TMenuOpenState = {
isOpen: boolean;
height: string | number;
};