/**
 * Redux Types
 */

// Notification state structure
export interface NotificationState {
  showNotification: boolean;
  textNotification: string;
  typeNotification: 'warn' | 'error' | 'success' | 'info' | '';
}

// Generic entity slice state
export interface EntitySliceState<T> {
  data: T[];
  loading: boolean;
  count: number;
  refetch: boolean;
  notify: NotificationState;
}

// Legacy entity slice state (for backward compatibility during migration)
export interface LegacyEntitySliceState<T> {
  [entityName: string]: T[] | boolean | number | NotificationState;
  loading: boolean;
  count: number;
  refetch: boolean;
  notify: NotificationState;
}

// Slice factory configuration
export interface EntitySliceConfig {
  name: string;
  endpoint: string;
  singularName?: string; // For notification messages (e.g., "User" instead of "Users")
}

// Auth state structure
export interface AuthState {
  currentUser: import('./entities').User | null;
  token: string | null;
  isFetching: boolean;
  errorMessage: string | null;
  loadingMessage: string | null;
  notify: NotificationState;
}

// Style state structure
export interface StyleState {
  darkMode: boolean;
  bgLayoutColor: string;
  focusRingColor: string;
  corners: string;
  cardsColor: string;
}

// Main app state structure
export interface MainState {
  isAsideMobileExpanded: boolean;
  isAsideLgActive: boolean;
}
