import React from 'react';

// Base sidebar item interface
export interface SidebarItemData {
  id: string;
  name: string;
  link?: string;
  icon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
  submenu?: SidebarSubmenuItemData[];
  moduleEnabled?: boolean; // New property for module state
}

// Submenu item interface
export interface SidebarSubmenuItemData {
  id: string;
  name: string;
  link?: string;
  icon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
}

// Sidebar state interface
export interface SidebarState {
  openItemId: string | null;
  isMinimized: boolean;
}

// Sidebar context interface
export interface SidebarContextType {
  state: SidebarState;
  toggleItem: (itemId: string) => void;
  closeAll: () => void;
  isItemOpen: (itemId: string) => boolean;
  isItemActive: (itemPath?: string) => boolean;
  minimizeSidebar: () => void;
  expandSidebar: () => void;
}

// Component props interfaces
export interface SidebarProps {
  data: SidebarItemData[];
}

export interface SidebarItemProps {
  item: SidebarItemData;
  isOpen: boolean;
  onToggle: () => void;
  isActive: boolean;
  isMinimized: boolean;
}

export interface SidebarSubmenuProps {
  item: SidebarItemData;
  isOpen: boolean;
  isMinimized?: boolean;
}

export interface SidebarUserProps {
  isMinimized?: boolean;
} 