import { ReactNode } from 'react';

export interface Theme {
  backgroundColor: string;
  textColor: string;
  primary: string;
  secondary: string;
}

export interface ErrorResponse extends Error {
  code: keyof typeof import('../constants').ERROR_MESSAGES;
  details?: Record<string, unknown>;
  timestamp?: string;
}

export type Size = 'small' | 'medium' | 'large';

export interface BaseProps {
  className?: string;
  testId?: string;
  children?: ReactNode;
  'aria-label'?: string;
  role?: string;
}

export interface LoadingProps extends BaseProps {
  size?: Size;
  color?: string;
  message?: string;
}

export interface ErrorBoundaryProps extends BaseProps {
  onError?: (error: Error, info?: React.ErrorInfo) => void;
  fallback?: ReactNode;
  error?: Error | null;
}
