import typing
from SIMULTAN.Data.Geometry import IOffsetQueryable, GeometryModel, Face, BaseGeometry, SimGeometryParameterSource
from SIMULTAN.Projects import ProjectData
from System.Collections.Generic import Dictionary_2, IEnumerable_1, List_1
from SIMULTAN.Exchange.SimNetworkConnectors import SimNetworkGeometryModelConnector
from SIMULTAN.Data.FlowNetworks import SimFlowNetwork
from System.IO import FileInfo
from SIMULTAN.Utils import IDispatcherTimerFactory
from SIMULTAN.Data.SimNetworks import SimNetwork
from System import ValueTuple_2, MulticastDelegate, IAsyncResult, AsyncCallback
from SIMULTAN.Data.Components import SimInstancePlacementGeometry, SimComponentInstance, SimComponent, SimBaseParameter
from SIMULTAN.Data.SitePlanner import SitePlannerProject, SitePlannerBuilding
from System.Reflection import MethodInfo

class ComponentGeometryExchange(IOffsetQueryable):
    def __init__(self, projectData: ProjectData) -> None: ...
    SimNetworkModelConnectors : Dictionary_2[GeometryModel, SimNetworkGeometryModelConnector]
    @property
    def EnableGeometryEvents(self) -> bool: ...
    @EnableGeometryEvents.setter
    def EnableGeometryEvents(self, value: bool) -> bool: ...
    def ConvertNetwork(self, network: SimFlowNetwork, targetFile: FileInfo, dispatcherTimer: IDispatcherTimerFactory) -> GeometryModel: ...
    def ConvertSimNetwork(self, network: SimNetwork, targetFile: FileInfo, dispatcherTimer: IDispatcherTimerFactory) -> GeometryModel: ...
    def GetFaceOffset(self, face: Face) -> ValueTuple_2[float, float]: ...
    def GetGeometry(self, placement: SimInstancePlacementGeometry) -> BaseGeometry: ...
    def IsConnected(self, project: SitePlannerProject) -> bool: ...
    def NotifyGeometryInvalidated(self, geometry: IEnumerable_1[BaseGeometry]) -> None: ...
    def OnParameterSourceFilterChanged(self, source: SimGeometryParameterSource) -> None: ...
    def Synchronize(self) -> None: ...
    # Skipped Associate due to it being static, abstract and generic.

    Associate : Associate_MethodGroup
    class Associate_MethodGroup:
        @typing.overload
        def __call__(self, component: SimComponent, geometries: IEnumerable_1[BaseGeometry]) -> List_1[ValueTuple_2[SimComponentInstance, bool]]:...
        @typing.overload
        def __call__(self, instance: SimComponentInstance, geometries: IEnumerable_1[BaseGeometry]) -> None:...
        @typing.overload
        def __call__(self, component: SimComponent, building: SitePlannerBuilding) -> None:...
        @typing.overload
        def __call__(self, component: SimComponent, geometry: BaseGeometry) -> ValueTuple_2[SimComponentInstance, bool]:...
        @typing.overload
        def __call__(self, instance: SimComponentInstance, geometry: BaseGeometry) -> None:...

    # Skipped Disassociate due to it being static, abstract and generic.

    Disassociate : Disassociate_MethodGroup
    class Disassociate_MethodGroup:
        @typing.overload
        def __call__(self, component: SimComponent, building: SitePlannerBuilding) -> None:...
        @typing.overload
        def __call__(self, component: SimComponent, geometry: BaseGeometry) -> None:...
        @typing.overload
        def __call__(self, instance: SimComponentInstance, geometry: BaseGeometry) -> None:...

    # Skipped GetComponents due to it being static, abstract and generic.

    GetComponents : GetComponents_MethodGroup
    class GetComponents_MethodGroup:
        @typing.overload
        def __call__(self, building: SitePlannerBuilding) -> IEnumerable_1[SimComponent]:...
        @typing.overload
        def __call__(self, geometry: BaseGeometry) -> IEnumerable_1[SimComponent]:...

    # Skipped GetPlacements due to it being static, abstract and generic.

    GetPlacements : GetPlacements_MethodGroup
    class GetPlacements_MethodGroup:
        @typing.overload
        def __call__(self, building: SitePlannerBuilding) -> IEnumerable_1[SimInstancePlacementGeometry]:...
        @typing.overload
        def __call__(self, geometry: BaseGeometry) -> IEnumerable_1[SimInstancePlacementGeometry]:...

    # Skipped OnParameterValueChanged due to it being static, abstract and generic.

    OnParameterValueChanged : OnParameterValueChanged_MethodGroup
    class OnParameterValueChanged_MethodGroup:
        @typing.overload
        def __call__(self, parameter: SimBaseParameter, instance: SimComponentInstance) -> None:...
        @typing.overload
        def __call__(self, parameters: IEnumerable_1[SimBaseParameter], instance: SimComponentInstance) -> None:...


    class AssociationChangedEventHandler(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, affected_geometry: IEnumerable_1[BaseGeometry], callback: AsyncCallback, object: typing.Any) -> IAsyncResult: ...
        def EndInvoke(self, result: IAsyncResult) -> None: ...
        def Invoke(self, sender: typing.Any, affected_geometry: IEnumerable_1[BaseGeometry]) -> None: ...


    class BuildingAssociationChangedEventHandler(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, affectedBuildings: IEnumerable_1[SitePlannerBuilding], callback: AsyncCallback, object: typing.Any) -> IAsyncResult: ...
        def EndInvoke(self, result: IAsyncResult) -> None: ...
        def Invoke(self, sender: typing.Any, affectedBuildings: IEnumerable_1[SitePlannerBuilding]) -> None: ...


    class BuildingComponentParameterChangedEventHandler(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, affectedBuilding: SitePlannerBuilding, callback: AsyncCallback, object: typing.Any) -> IAsyncResult: ...
        def EndInvoke(self, result: IAsyncResult) -> None: ...
        def Invoke(self, sender: typing.Any, affectedBuilding: SitePlannerBuilding) -> None: ...


