from __future__ import annotations

from typing import Dict, Iterable, List, Optional

from .tmm import ThermalNetwork

class Parameters:
    def __init__(self) -> None: ...
    def add_parameter(self, name: str, value: object) -> None: ...
    def remove_parameter(self, name: str) -> None: ...
    def get_parameter(self, name: str) -> object: ...
    def set_parameter(self, name: str, value: object) -> None: ...
    def contains(self, name: str) -> bool: ...
    def size(self) -> int: ...
    def get_memory_address(self, name: str) -> int: ...
    def get_idx(self, name: str) -> int: ...
    def get_size_of_parameter(self, name: str) -> int: ...
    @property
    def data(self) -> Dict[str, object]: ...

class ThermalEntity:
    @property
    def type(self) -> str: ...
    @property
    def node_index_1(self) -> int: ...
    @property
    def node_index_2(self) -> int: ...
    def string_representation(self) -> str: ...
    def get_value(self) -> float: ...
    def set_value(self, value: float) -> None: ...
    def get_value_pointer(self) -> int: ...
    def clone(self) -> ThermalEntity: ...

class AttributeEntity(ThermalEntity):
    def __init__(self, network: ThermalNetwork, attribute: str, node: int) -> None: ...

class ConductiveCouplingEntity(ThermalEntity):
    def __init__(self, network: ThermalNetwork, node_1: int, node_2: int) -> None: ...

class RadiativeCouplingEntity(ThermalEntity):
    def __init__(self, network: ThermalNetwork, node_1: int, node_2: int) -> None: ...

class Formula:
    def compile_formula(self) -> None: ...
    def apply_formula(self) -> None: ...
    def apply_compiled_formula(self) -> None: ...
    def get_value(self) -> float: ...
    def get_derivative_values(self) -> Optional[List[float]]: ...
    @property
    def entity(self) -> ThermalEntity: ...
    @property
    def parameter_dependencies(self) -> Iterable[str]: ...
    def clone(self) -> Formula: ...

class ParameterFormula(Formula):
    def __init__(
        self, entity: ThermalEntity, parameters: Parameters, parameter: str
    ) -> None: ...

class ValueFormula(Formula):
    def __init__(self, entity: ThermalEntity) -> None: ...
    def set_value(self, value: float) -> None: ...

class Formulas:
    def __init__(
        self,
        network: Optional[ThermalNetwork] = None,
        parameters: Optional[Parameters] = None,
    ) -> None: ...
    def associate(self, network: ThermalNetwork, parameters: Parameters) -> None: ...
    def create_parameter_formula(
        self, entity: ThermalEntity, parameter: str
    ) -> ParameterFormula: ...
    def add_formula(self, formula: Formula) -> None: ...
    def apply_formulas(self) -> None: ...
    @property
    def formulas(self) -> List[Formula]: ...
    @property
    def parameter_dependencies(self) -> Dict[str, List[Formula]]: ...

__all__ = [
    "Parameters",
    "ThermalEntity",
    "AttributeEntity",
    "ConductiveCouplingEntity",
    "RadiativeCouplingEntity",
    "Formula",
    "ParameterFormula",
    "ValueFormula",
    "Formulas",
]
