export enum ErrorType {
    Unexpected = "Unexpected",
    MonitoredAreaWithoutPvAreaException = "MonitoredAreaWithoutPvAreaException",
    PvAreaWithoutPvPanelException = "PvAreaWithoutPvPanelException",
    PvAreaWithZeroAreaException = "PvAreaWithZeroAreaException",
    BadCredentialsException = "BadCredentialsException"
}

export type ErrorDialogData = {
    title?: string,
    content: string
}

export const errorMapper = new Map<ErrorType, ErrorDialogData>();
errorMapper.set(ErrorType.Unexpected, {title: "Unexpected Error", content: "Unexpected Error Occurred."});
errorMapper.set(ErrorType.MonitoredAreaWithoutPvAreaException, {content: "Could not compute generated energy for monitored area #_. It does not contain any pv areas. Try fixing it in Monitored Areas Section"});
errorMapper.set(ErrorType.PvAreaWithoutPvPanelException, {content: "Could not compute generated energy for _. which does not have pv panel configured. Try fixing it in Monitored Areas Section"});
errorMapper.set(ErrorType.PvAreaWithZeroAreaException, {content: "Could not compute generated energy for _ which has 0 m2 area. Try fixing it in Monitored Areas Section"});
errorMapper.set(ErrorType.BadCredentialsException, {content: "Bad username or password."});