"""Utilities package for spicelab."""

from .design import (
    OpAmpGainResult,
    RCFilterResult,
    VoltageDividerResult,
    db_power_to_linear,
    db_to_linear,
    design_inverting_gain,
    design_noninverting_gain,
    design_rc_lowpass,
    design_voltage_divider,
    linear_to_db,
    linear_to_db_power,
    max_resistor_voltage,
    ntc_resistance,
    ntc_temperature,
    opamp_inverting_gain,
    opamp_noninverting_gain,
    power_dissipation,
    pt100_resistance,
    pt1000_resistance,
    rc_cutoff_frequency,
    rc_time_constant,
    resistor_current,
    resistor_power,
    rl_time_constant,
    voltage_divider_ratio,
)
from .e_series import (
    E12_BASE,
    E24_BASE,
    ComponentMatch,
    ESeries,
    enumerate_values,
    find_best_match,
    find_parallel_combination,
    find_series_combination,
    format_value,
    get_capacitor_series,
    get_series_array,
    nearest_capacitor,
    nearest_value,
    round_to_series,
    tolerance_for_series,
)
from .log import get_logger
from .spice_compat import (
    convert_directives_for_engine,
    convert_expression_for_engine,
    convert_if_to_ternary,
    convert_param_directive,
)

__all__ = [
    # Logging
    "get_logger",
    # E-series
    "ESeries",
    "E12_BASE",
    "E24_BASE",
    "ComponentMatch",
    "enumerate_values",
    "get_series_array",
    "round_to_series",
    "nearest_value",
    "find_parallel_combination",
    "find_series_combination",
    "find_best_match",
    "get_capacitor_series",
    "nearest_capacitor",
    "tolerance_for_series",
    "format_value",
    # Design helpers
    "VoltageDividerResult",
    "OpAmpGainResult",
    "RCFilterResult",
    "voltage_divider_ratio",
    "design_voltage_divider",
    "opamp_noninverting_gain",
    "opamp_inverting_gain",
    "design_noninverting_gain",
    "design_inverting_gain",
    "rc_time_constant",
    "rc_cutoff_frequency",
    "rl_time_constant",
    "design_rc_lowpass",
    "pt100_resistance",
    "pt1000_resistance",
    "ntc_resistance",
    "ntc_temperature",
    "power_dissipation",
    "resistor_power",
    "resistor_current",
    "max_resistor_voltage",
    "db_to_linear",
    "linear_to_db",
    "db_power_to_linear",
    "linear_to_db_power",
    # SPICE compatibility
    "convert_if_to_ternary",
    "convert_expression_for_engine",
    "convert_param_directive",
    "convert_directives_for_engine",
]
