import typing, abc
from SIMULTAN.Data.SimMath import SimColor
from System.Collections.Generic import IEnumerable_1
from System.ComponentModel import INotifyPropertyChanged
from System.Collections.ObjectModel import ObservableCollection_1
from SIMULTAN.Data import SimNamedObject_1, SimId, SimManagedCollection_1, IReferenceLocation
from SIMULTAN.Data.MultiValues import SimMultiValueBigTable
from System import Guid, MulticastDelegate, IAsyncResult, AsyncCallback, DateTime
from System.Reflection import MethodInfo
from SIMULTAN.Projects import ProjectData

class DefaultColorMappingColors:
    def __init__(self) -> None: ...
    BaseLightingFactor : float
    NotParameterizedColor : SimColor
    OutOfRangeColor : SimColor


class SimAveragePrefilter(SimPrefilter):
    def __init__(self) -> None: ...
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    def Filter(self, values: IEnumerable_1[float], timelineCurrentIndex: int) -> IEnumerable_1[float]: ...


class SimColorMap(abc.ABC):
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    @abc.abstractmethod
    def Map(self, value: float) -> SimColor: ...


class SimColorMarker(INotifyPropertyChanged):
    def __init__(self, value: float, color: SimColor) -> None: ...
    @property
    def Color(self) -> SimColor: ...
    @Color.setter
    def Color(self, value: SimColor) -> SimColor: ...
    @property
    def Value(self) -> float: ...
    @Value.setter
    def Value(self, value: float) -> float: ...


class SimColorMarkerCollection(ObservableCollection_1[SimColorMarker]):
    @typing.overload
    def __init__(self, owner: SimColorMap) -> None: ...
    @typing.overload
    def __init__(self, owner: SimColorMap, marker: IEnumerable_1[SimColorMarker]) -> None: ...
    @property
    def Count(self) -> int: ...
    @property
    def Item(self) -> SimColorMarker: ...
    @Item.setter
    def Item(self, value: SimColorMarker) -> SimColorMarker: ...
    @property
    def Owner(self) -> SimColorMap: ...


class SimComponentIndexUsage(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:
    Row : SimComponentIndexUsage # 0
    Column : SimComponentIndexUsage # 1


class SimDefaultPrefilter(SimPrefilter):
    def __init__(self) -> None: ...
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    def Filter(self, values: IEnumerable_1[float], timelineCurrentIndex: int) -> IEnumerable_1[float]: ...


class SimLinearGradientColorMap(SimColorMap):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, marker: IEnumerable_1[SimColorMarker]) -> None: ...
    @property
    def ColorMarkers(self) -> SimColorMarkerCollection: ...
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    @staticmethod
    def Lerp(a: SimColorMarker, b: SimColorMarker, val: float) -> SimColor: ...
    def Map(self, value: float) -> SimColor: ...


class SimMaximumPrefilter(SimPrefilter):
    def __init__(self) -> None: ...
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    def Filter(self, values: IEnumerable_1[float], timelineCurrentIndex: int) -> IEnumerable_1[float]: ...


class SimMinimumPrefilter(SimPrefilter):
    def __init__(self) -> None: ...
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    def Filter(self, values: IEnumerable_1[float], timelineCurrentIndex: int) -> IEnumerable_1[float]: ...


class SimPrefilter(abc.ABC):
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    @abc.abstractmethod
    def Filter(self, values: IEnumerable_1[float], timelineCurrentIndex: int) -> IEnumerable_1[float]: ...


class SimThresholdColorMap(SimColorMap):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, marker: IEnumerable_1[SimColorMarker]) -> None: ...
    @property
    def ColorMarkers(self) -> SimColorMarkerCollection: ...
    @property
    def Owner(self) -> SimValueMapping: ...
    @Owner.setter
    def Owner(self, value: SimValueMapping) -> SimValueMapping: ...
    def Map(self, value: float) -> SimColor: ...


class SimValueMapping(SimNamedObject_1[SimValueMappingCollection]):
    def __init__(self, name: str, table: SimMultiValueBigTable, prefilter: SimPrefilter, colorMap: SimColorMap) -> None: ...
    @property
    def ColorMap(self) -> SimColorMap: ...
    @ColorMap.setter
    def ColorMap(self, value: SimColorMap) -> SimColorMap: ...
    @property
    def ComponentIndexUsage(self) -> SimComponentIndexUsage: ...
    @ComponentIndexUsage.setter
    def ComponentIndexUsage(self, value: SimComponentIndexUsage) -> SimComponentIndexUsage: ...
    @property
    def Description(self) -> str: ...
    @Description.setter
    def Description(self, value: str) -> str: ...
    @property
    def Factory(self) -> SimValueMappingCollection: ...
    @Factory.setter
    def Factory(self, value: SimValueMappingCollection) -> SimValueMappingCollection: ...
    @property
    def GlobalID(self) -> Guid: ...
    @property
    def Id(self) -> SimId: ...
    @Id.setter
    def Id(self, value: SimId) -> SimId: ...
    @property
    def LocalID(self) -> int: ...
    @property
    def Name(self) -> str: ...
    @Name.setter
    def Name(self, value: str) -> str: ...
    @property
    def Prefilter(self) -> SimPrefilter: ...
    @Prefilter.setter
    def Prefilter(self, value: SimPrefilter) -> SimPrefilter: ...
    @property
    def Table(self) -> SimMultiValueBigTable: ...
    @Table.setter
    def Table(self, value: SimMultiValueBigTable) -> SimMultiValueBigTable: ...
    def ApplyMapping(self, objectIndex: int, timelineIndex: int) -> SimColor: ...

    class ValueMappingChangedEventHandler(MulticastDelegate):
        def __init__(self, object: typing.Any, method: int) -> None: ...
        @property
        def Method(self) -> MethodInfo: ...
        @property
        def Target(self) -> typing.Any: ...
        def BeginInvoke(self, sender: typing.Any, callback: AsyncCallback, object: typing.Any) -> IAsyncResult: ...
        def EndInvoke(self, result: IAsyncResult) -> None: ...
        def Invoke(self, sender: typing.Any) -> None: ...



class SimValueMappingCollection(SimManagedCollection_1[SimValueMapping]):
    def __init__(self, projectData: ProjectData) -> None: ...
    @property
    def CalledFromLocation(self) -> IReferenceLocation: ...
    @property
    def Count(self) -> int: ...
    @property
    def HasChanges(self) -> bool: ...
    @property
    def Item(self) -> SimValueMapping: ...
    @Item.setter
    def Item(self, value: SimValueMapping) -> SimValueMapping: ...
    @property
    def LastChange(self) -> DateTime: ...
    @property
    def ProjectData(self) -> ProjectData: ...
    def EndLoading(self) -> None: ...
    def StartLoading(self) -> None: ...

