"""
NX Integration
==============

Siemens NX and Nastran integration modules.

Modules:
- solver: NXSolver for running simulations
- updater: NXParameterUpdater for design updates
- session_manager: NX session lifecycle management
- solve_simulation: Low-level simulation execution
"""

# Lazy imports to avoid import errors when NX modules aren't available
def __getattr__(name):
    if name == 'NXSolver':
        from .solver import NXSolver
        return NXSolver
    elif name == 'run_nx_simulation':
        from .solver import run_nx_simulation
        return run_nx_simulation
    elif name == 'NXParameterUpdater':
        from .updater import NXParameterUpdater
        return NXParameterUpdater
    elif name == 'update_nx_model':
        from .updater import update_nx_model
        return update_nx_model
    elif name == 'NXSessionManager':
        from .session_manager import NXSessionManager
        return NXSessionManager
    elif name == 'NXSessionInfo':
        from .session_manager import NXSessionInfo
        return NXSessionInfo
    elif name == 'ModelCleanup':
        from .model_cleanup import ModelCleanup
        return ModelCleanup
    elif name == 'cleanup_substudy':
        from .model_cleanup import cleanup_substudy
        return cleanup_substudy
    raise AttributeError(f"module 'optimization_engine.nx' has no attribute '{name}'")

__all__ = [
    'NXSolver',
    'run_nx_simulation',
    'NXParameterUpdater',
    'update_nx_model',
    'NXSessionManager',
    'NXSessionInfo',
    'ModelCleanup',
    'cleanup_substudy',
]
