// Type exports
// This file exports all TypeScript type definitions for the library
// Common types
export * from '../@types/common';
export * from '../@types/page';
export * from '../@types/pagination-model';
// Theme types are declared in .d.ts files and don't need to be re-exported
// They are automatically available when the library is imported
// Component prop types - these will be automatically generated by TypeScript
// from the component implementations, but we can also define common interfaces here
// Base component props interface
export interface BaseComponentProps {
  className?: string;
  style?: React.CSSProperties;
  'data-testid'?: string;
}
// Theme configuration interface
export interface ThemeConfig {
  mode: 'light' | 'dark';
  primaryColor?: any; // Color type from theme
  direction: 'ltr' | 'rtl';
}
// Library provider props interface
export interface ERPUIProviderProps {
  theme?: ThemeConfig;
  children: React.ReactNode;
}
// Redux integration interfaces
export interface LibraryReduxSlices {
  share?: any;
  header?: any;
  reportsTitleBar?: any;
}
export interface ReduxIntegration {
  slices: LibraryReduxSlices;
  middleware: any[];
}
// Common data interfaces
export interface SelectOption {
  label: string;
  value: any;
  disabled?: boolean;
}
export interface TableColumn {
  id: string;
  label: string;
  minWidth?: number;
  align?: 'left' | 'right' | 'center';
  format?: (value: any) => string;
}
export interface PaginationProps {
  count: number;
  page: number;
  rowsPerPage: number;
  onPageChange: (event: unknown, newPage: number) => void;
  onRowsPerPageChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
}
// Form interfaces
export interface FormField {
  name: string;
  label: string;
  type: string;
  required?: boolean;
  validation?: any;
}
// API response interfaces
export interface ApiResponse<T = any> {
  success: boolean;
  data?: T;
  message?: string;
  error?: string;
}
// Language and localization interfaces
export interface Language {
  code: string;
  name: string;
  direction: 'ltr' | 'rtl';
  flag?: string;
}
export interface LanguageContextType {
  currentLanguage: Language;
  availableLanguages: Language[];
  changeLanguage: (languageCode: string) => void;
  t: (key: string, params?: Record<string, any>) => string;
}
// Auth interfaces
export interface User {
  id: string;
  name: string;
  email: string;
  role?: string;
  permissions?: string[];
}
export interface AuthContextType {
  user: User | null;
  isAuthenticated: boolean;
  login: (credentials: any) => Promise<void>;
  logout: () => void;
  loading: boolean;
}
// Page context interfaces
export interface PageContextType {
  currentPage: string;
  setCurrentPage: (page: string) => void;
  breadcrumbs: any[];
  setBreadcrumbs: (breadcrumbs: any[]) => void;
}
// Permission interfaces
export interface Permission {
  resource: string;
  action: string;
  granted: boolean;
}
export interface PermissionContextType {
  permissions: Permission[];
  hasPermission: (resource: string, action: string) => boolean;
  loading: boolean;
}
