import { ComponentType } from 'react' import { ConnectionTimeoutTroubleshooting } from './errorMappings/ConnectionTimeout' import { ConnectionTimeoutError } from '@/types/api-errors' import type { ClassifiedError, KnownErrorType } from '@/types/api-errors' import type { ResponseError } from '@/types/base' export interface ErrorMapping { id: KnownErrorType Troubleshooting: ComponentType } type ErrorConstructor = new ( ...args: ConstructorParameters ) => ClassifiedError export const ERROR_MAPPINGS = new Map([ [ ConnectionTimeoutError, { id: 'connection-timeout', Troubleshooting: ConnectionTimeoutTroubleshooting }, ], ])