import React, { ReactElement } from 'react';

import { TooltipProps } from '../Tooltip';
import { Logo } from '../Navbar/types.d';

export type SidebarProps = {
  hideLogo?: boolean;
  logo?: Logo;
  minimized?: boolean;
};

export type SideBarChild = Omit<SideBarMenuItemProps, 'subItems'>;

export type SideBarMenuItemProps = {
  className?: string;
  count?: number;
  countLoading?: boolean;
  disabled?: boolean;
  icon?: ReactElement;
  id: string;
  isSelected: boolean;
  minimized?: boolean;
  onClick(id: string): void;
  subItems?: SideBarChild[];
  title: React.ReactNode;
  tooltipText?: TooltipProps['title'];
};

export type SideBarAccordItemProps = {
  className?: string;
  color?: string;
  count?: number;
  isSelected?: boolean;
  minimized?: boolean;
  onClick?: () => void;
  text: string;
};

export type SideBarAccordGroupProps = {
  className?: string;
  customElements?: ReactElement;
  items: SideBarAccordItemProps[];
  minimized?: boolean;
  onClick?: () => void;
  position?: 'top' | 'bottom';
  title: string;
};

export type SideBarMenuProps = {
  className?: string;
  data: SideBarMenuItemProps[];
  minimized?: boolean;
};
