# from .transforms import __all__ as transforms_all
from ._base import AugmentationTransformer, BaseTransform
from ._base import __all__ as base_transforms_all
from .mixup import mixup
from .signal_aug_transforms import (
    AddSpike,
    AddWhiteNoise,
    BandstopAug,
    FTSurrogate,
    ScaleAmplitude,
    SignFlip,
    TimeReverse,
)
from .signal_augment import __all__ as signal_augment_all
from .signal_augment import (
    add_spike,
    add_white_noise,
    bandstop_aug,
    ft_surrogate,
    scale_amplitude,
    sign_flip,
    time_reverse,
)
from .transforms import ComposedTransform, RandSelectiveTransform

__all__ = [
    'mixup',
    'BaseTransform',
    'AugmentationTransformer',
    'RandSelectiveTransform',
    'ComposedTransform',
]
__all__ += signal_augment_all + base_transforms_all


def __getattr__(name: str):
    import importlib

    if name in signal_augment_all:
        module = importlib.import_module('.signal_augment', __name__)
        return getattr(module, name)
    elif name in base_transforms_all:
        module = importlib.import_module('._base', __name__)
        return getattr(module, name)
    else:
        raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
