import typing, abc
from SIMULTAN.Data.MultiValues import SimMultiValueBigTable, SimMultiValueCollection, SimMultiValueBigTableHeader
from System.Collections.Generic import List_1
from System import Exception, Array_1
from System.Collections import IDictionary
from System.Reflection import MethodBase
from System.IO import FileInfo
from System.ComponentModel import ISynchronizeInvoke
from System.Text import Encoding

class BigTableToCSVExporter(abc.ABC):
    @staticmethod
    def ExportToCSV(table: SimMultiValueBigTable, filePathAndName: str, delimiter: str, decimalSeparator: str, rowHeaderHeader: str, columnHeaders: bool, rowHeaders: bool, columnUnits: bool, rowUnits: bool) -> None: ...


class CSVExporter:
    def __init__(self, nrColumns: int, csvDelimiter: str = ...) -> None: ...
    CSV_LINEDELIMITER : str
    @property
    def CSV_DELIMITER(self) -> str: ...
    @CSV_DELIMITER.setter
    def CSV_DELIMITER(self, value: str) -> str: ...
    def AddMultipleRecords(self, records: List_1[List_1[str]]) -> None: ...
    def AddRecord(self, record: List_1[str]) -> None: ...
    def WriteFile(self, filePath: str) -> None: ...


class CSVImportException(Exception):
    def __init__(self, reason: CSVImportExceptionReason, data: Array_1[typing.Any]) -> None: ...
    @property
    def Data(self) -> IDictionary: ...
    @property
    def HelpLink(self) -> str: ...
    @HelpLink.setter
    def HelpLink(self, value: str) -> str: ...
    @property
    def HResult(self) -> int: ...
    @HResult.setter
    def HResult(self, value: int) -> int: ...
    @property
    def InnerException(self) -> Exception: ...
    @property
    def Message(self) -> str: ...
    @property
    def Reason(self) -> CSVImportExceptionReason: ...
    @property
    def ReasonData(self) -> Array_1[typing.Any]: ...
    @property
    def Source(self) -> str: ...
    @Source.setter
    def Source(self, value: str) -> str: ...
    @property
    def StackTrace(self) -> str: ...
    @property
    def TargetSite(self) -> MethodBase: ...


class CSVImportExceptionReason(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    EmptyFile : CSVImportExceptionReason # 0
    NotEnoughRows : CSVImportExceptionReason # 1
    NotEnoughColumns : CSVImportExceptionReason # 2
    ColumnCountMismatch : CSVImportExceptionReason # 3
    ParseError : CSVImportExceptionReason # 4


class CSVToValueFieldImporter(abc.ABC):
    @staticmethod
    def ConvertCsvToMultiValueBigTableComponents(file: FileInfo, settings: CSVToValueFieldImporterSettings, rowHeaderFormat: str, rowHeaderUnit: str, columnHeaderFormat: str, columnHeaderUnit: str) -> MultiValueBigTableComponents: ...
    @staticmethod
    def Import(collection: SimMultiValueCollection, file: FileInfo, settings: CSVToValueFieldImporterSettings, unitRows: str, unitColumns: str, rowHeaderFormat: str, rowHeaderUnit: str, columnHeaderFormat: str, columnHeaderUnit: str, dispatcher: ISynchronizeInvoke = ...) -> SimMultiValueBigTable: ...


class CSVToValueFieldImporterSettings:
    def __init__(self) -> None: ...
    @property
    def DecimalSeparator(self) -> str: ...
    @DecimalSeparator.setter
    def DecimalSeparator(self, value: str) -> str: ...
    @property
    def Delimiter(self) -> str: ...
    @Delimiter.setter
    def Delimiter(self, value: str) -> str: ...
    @property
    def HasColumnHeaders(self) -> bool: ...
    @HasColumnHeaders.setter
    def HasColumnHeaders(self, value: bool) -> bool: ...
    @property
    def HasColumnUnits(self) -> bool: ...
    @HasColumnUnits.setter
    def HasColumnUnits(self, value: bool) -> bool: ...
    @property
    def HasRowHeaders(self) -> bool: ...
    @HasRowHeaders.setter
    def HasRowHeaders(self, value: bool) -> bool: ...
    @property
    def HasRowUnits(self) -> bool: ...
    @HasRowUnits.setter
    def HasRowUnits(self, value: bool) -> bool: ...
    @property
    def Name(self) -> str: ...
    @Name.setter
    def Name(self, value: str) -> str: ...


class FileHelper(abc.ABC):
    @staticmethod
    def GetEncoding(filename: str) -> Encoding: ...


class MultiValueBigTableComponents:
    def __init__(self, columnHeaders: List_1[SimMultiValueBigTableHeader], rowHeaders: List_1[SimMultiValueBigTableHeader], values: List_1[List_1[typing.Any]]) -> None: ...
    ColumnHeaders : List_1[SimMultiValueBigTableHeader]
    RowHeaders : List_1[SimMultiValueBigTableHeader]
    Values : List_1[List_1[typing.Any]]

