from jstreams.stream import Stream, Opt, stream, optional, pair_stream, nullable

from jstreams.class_operations import ClassOps

from jstreams.stream_operations import (
    not_null_elements,
    extract_list,
    extract_non_null_list,
    extract_list_strict,
    extract_non_null_list_strict,
)

from jstreams.iterable_operations import (
    find_first,
    take_while,
    drop_while,
    matching,
    reduce,
    take_until,
    drop_until,
    find_last,
)

from jstreams.mapper import (
    map_it,
    flat_map,
    mapper_of,
    mapper_with_of,
    Mapper,
    MapperWith,
)

from jstreams.reducer import reducer_of, Reducer

from jstreams.stream_factories import triplet_stream
from jstreams.stream_predicates import any_of, all_of, none_of, all_none, all_not_none

from jstreams.try_opt import (
    Try,
    ErrorLog,
    try_,
    try_of,
    catch,
    catch_with,
    try_with_resource,
    raises,
)

from jstreams.rx import (
    ObservableSubscription,
    Observable,
    Flowable,
    Single,
    BehaviorSubject,
    PublishSubject,
    ReplaySubject,
    CompletedHandler,
    ErrorHandler,
    DisposeHandler,
    NextHandler,
    Pipe,
    Reduce,
    Filter,
    Map,
    RxOperator,
    BaseFilteringOperator,
    BaseMappingOperator,
    rx_distinct_until_changed,
    rx_reduce,
    rx_filter,
    rx_map,
    rx_take,
    rx_take_while,
    rx_take_until,
    rx_drop_while,
    rx_drop_until,
    rx_drop,
    rx_buffer,
    rx_buffer_count,
    rx_throttle,
    TakeWhile,
    TakeUntil,
    Drop,
    DropUntil,
    DropWhile,
    Take,
    Buffer,
    BufferCount,
    Throttle,
    DistinctUntilChanged,
    RX,
    Timestamped,
    rx_defer,
    rx_distinct,
    rx_element_at,
    rx_empty,
    rx_ignore_all,
    rx_map_to,
    rx_never,
    rx_of_type,
    rx_range,
    rx_scan,
    rx_tap,
    rx_throw,
    rx_timestamp,
    Distinct,
    ElementAt,
    IgnoreAll,
    MapTo,
    Scan,
    Tap,
    Ignore,
    TimestampOperator,
    rx_debounce,
    Debounce,
    rx_combine_latest,
    rx_zip,
)

from jstreams.thread import (
    LoopingThread,
    CallbackLoopingThread,
    cancel_thread,
    Cancellable,
)

from jstreams.timer import (
    Timer,
    Interval,
    CountdownTimer,
    set_timer,
    set_interval,
    clear,
)

from jstreams.ioc import (
    injector,
    AutoInit,
    AutoStart,
    inject,
    inject_optional,
    var,
    InjectedDependency,
    OptionalInjectedDependency,
    resolve,
    resolve_dependencies,
    resolve_variables,
    resolve_all,
    component,
    service,
    Variable,
    StrVariable,
    IntVariable,
    FloatVariable,
    DictVariable,
    SetVariable,
    ListVariable,
    Dependency,
    InjectedVariable,
    inject_args,
    autowired,
    autowired_optional,
    provide,
    provide_variable,
    configuration,
    return_wired,
    return_wired_optional,
)

from jstreams.noop import (
    NoOpCls,
    noop,
)

from jstreams.utils import (
    require_non_null,
    is_number,
    to_int,
    to_float,
    as_list,
    keys_as_list,
    is_mth_or_fn,
    is_not_none,
    is_empty_or_none,
    each,
    dict_update,
    sort,
    Value,
    SynchronizedValue,
    extract,
    identity,
    chunk,
    flatten,
    flatten_deep,
    uniq,
    key_by,
    pick,
    omit,
    head,
    tail,
    last,
    to_nullable,
    repeat_value,
)

from jstreams.predicate import (
    Predicate,
    PredicateWith,
    is_true,
    is_false,
    is_none,
    is_in,
    is_not_in,
    equals,
    is_blank,
    default,
    str_contains,
    str_contains_ignore_case,
    str_starts_with,
    str_starts_with_ignore_case,
    str_ends_with,
    str_ends_with_ignore_case,
    str_matches,
    str_not_matches,
    str_longer_than,
    str_shorter_than,
    str_longer_than_or_eq,
    str_shorter_than_or_eq,
    equals_ignore_case,
    is_even,
    is_odd,
    is_positive,
    is_negative,
    is_zero,
    is_int,
    is_beween,
    is_beween_closed,
    is_beween_closed_start,
    is_beween_closed_end,
    not_,
    not_strict,
    not_equals,
    is_not_blank,
    is_higher_than,
    is_higher_than_or_eq,
    is_less_than,
    is_less_than_or_eq,
    has_key,
    has_value,
    is_in_interval,
    is_in_open_interval,
    is_key_in,
    is_value_in,
    contains,
    is_truthy,
    is_falsy,
    is_identity,
    has_length,
    is_instance,
    str_fullmatch,
    str_is_alnum,
    str_is_alpha,
    str_is_digit,
    str_is_lower,
    str_is_space,
    str_is_title,
    str_is_upper,
    predicate_of,
    predicate_with_of,
)

from jstreams.match import (
    Case,
    Match,
    DefaultCase,
    case,
    match,
    match_opt,
    default_case,
)

from jstreams.tuples import (
    Pair,
    pair,
    Triplet,
    triplet,
    left_matches,
    right_matches,
    middle_matches,
    pair_of,
    triplet_of,
)

from jstreams.collectors import (
    grouping_by,
    joining,
    grouping_by_mapping,
    Collectors,
)

from jstreams.state import (
    default_state,
    use_state,
    use_async_state,
    null_state,
)

from jstreams.scheduler import (
    scheduler,
    schedule_daily,
    schedule_duration,
    schedule_hourly,
    schedule_periodic,
    Duration,
)

from jstreams.eventing import (
    events,
    event,
    on_event,
    managed_events,
    dispose_managed_events_from,
    wait_for_event,  # Add wait_for_event to exports
)

from jstreams.annotations import (
    builder,
    getter,
    setter,
    locked,
    synchronized_static,
    synchronized,
    all_args,
    required_args,
    validate_args,
    default_on_error,
)

from jstreams.serialize import (
    json_serializable,
    json_deserialize,
    json_serialize,
    json_standard_serializable,
    json_serialize_return,
    json_deserialize_list,
    json_serialize_return_list,
)

__all__ = [
    "each",
    "dict_update",
    "Stream",
    "find_first",
    "map_it",
    "matching",
    "flat_map",
    "reduce",
    "take_while",
    "drop_while",
    "is_not_none",
    "sort",
    "Opt",
    "ClassOps",
    "stream",
    "optional",
    "Try",
    "ErrorLog",
    "ObservableSubscription",
    "Observable",
    "Flowable",
    "Single",
    "BehaviorSubject",
    "PublishSubject",
    "ReplaySubject",
    "Pipe",
    "Reduce",
    "Filter",
    "Map",
    "rx_reduce",
    "rx_filter",
    "rx_map",
    "RxOperator",
    "BaseFilteringOperator",
    "BaseMappingOperator",
    "LoopingThread",
    "CallbackLoopingThread",
    "Timer",
    "Interval",
    "CountdownTimer",
    "cancel_thread",
    "set_timer",
    "set_interval",
    "clear",
    "injector",
    "NoOpCls",
    "noop",
    "inject",
    "inject_optional",
    "var",
    "require_non_null",
    "is_number",
    "to_int",
    "to_float",
    "as_list",
    "keys_as_list",
    "is_true",
    "is_false",
    "is_none",
    "is_in",
    "is_not_in",
    "equals",
    "is_blank",
    "default",
    "all_none",
    "all_not_none",
    "str_contains",
    "str_contains_ignore_case",
    "str_starts_with",
    "str_starts_with_ignore_case",
    "str_ends_with",
    "str_ends_with_ignore_case",
    "str_matches",
    "str_not_matches",
    "str_longer_than",
    "str_shorter_than",
    "str_longer_than_or_eq",
    "str_shorter_than_or_eq",
    "equals_ignore_case",
    "is_even",
    "is_odd",
    "is_positive",
    "is_negative",
    "is_zero",
    "is_int",
    "is_beween",
    "is_beween_closed",
    "is_beween_closed_start",
    "is_beween_closed_end",
    "not_",
    "not_strict",
    "not_equals",
    "is_not_blank",
    "AutoStart",
    "AutoInit",
    "is_mth_or_fn",
    "Case",
    "Match",
    "DefaultCase",
    "case",
    "match",
    "match_opt",
    "default_case",
    "is_higher_than",
    "is_higher_than_or_eq",
    "is_less_than",
    "is_less_than_or_eq",
    "any_of",
    "all_of",
    "none_of",
    "predicate_of",
    "predicate_with_of",
    "mapper_of",
    "mapper_with_of",
    "Predicate",
    "Mapper",
    "PredicateWith",
    "MapperWith",
    "Reducer",
    "reducer_of",
    "has_key",
    "has_value",
    "is_in_interval",
    "is_in_open_interval",
    "contains",
    "rx_take",
    "rx_take_while",
    "rx_take_until",
    "rx_drop_while",
    "rx_drop_until",
    "rx_drop",
    "Cancellable",
    "is_empty_or_none",
    "CompletedHandler",
    "ErrorHandler",
    "DisposeHandler",
    "NextHandler",
    "TakeWhile",
    "TakeUntil",
    "Drop",
    "DropUntil",
    "DropWhile",
    "Take",
    "Pair",
    "pair",
    "Triplet",
    "triplet",
    "left_matches",
    "right_matches",
    "middle_matches",
    "pair_of",
    "triplet_of",
    "is_key_in",
    "is_value_in",
    "InjectedDependency",
    "OptionalInjectedDependency",
    "resolve_dependencies",
    "resolve_variables",
    "Variable",
    "StrVariable",
    "IntVariable",
    "FloatVariable",
    "Dependency",
    "InjectedVariable",
    "component",
    "inject_args",
    "grouping_by",
    "joining",
    "Collectors",
    "DictVariable",
    "default_state",
    "use_state",
    "use_async_state",
    "null_state",
    "extract_list",
    "extract_non_null_list",
    "not_null_elements",
    "ListVariable",
    "SetVariable",
    "service",
    "autowired",
    "autowired_optional",
    "provide",
    "provide_variable",
    "configuration",
    "return_wired",
    "return_wired_optional",
    "try_",
    "try_of",
    "scheduler",
    "schedule_daily",
    "schedule_duration",
    "schedule_hourly",
    "schedule_periodic",
    "Duration",
    "pair_stream",
    "triplet_stream",
    "catch",
    "catch_with",
    "try_with_resource",
    "resolve",
    "events",
    "event",
    "resolve_all",
    "Value",
    "SynchronizedValue",
    "extract",
    "identity",
    "builder",
    "getter",
    "setter",
    "locked",
    "synchronized_static",
    "synchronized",
    "all_args",
    "required_args",
    "validate_args",
    "default_on_error",
    "is_truthy",
    "is_falsy",
    "is_identity",
    "has_length",
    "is_instance",
    "str_fullmatch",
    "str_is_alnum",
    "str_is_alpha",
    "str_is_digit",
    "str_is_lower",
    "str_is_space",
    "str_is_title",
    "str_is_upper",
    "grouping_by_mapping",
    "RX",
    "take_until",
    "drop_until",
    "find_last",
    "on_event",
    "managed_events",
    "dispose_managed_events_from",
    "wait_for_event",
    "nullable",
    "rx_distinct_until_changed",
    "rx_buffer",
    "rx_buffer_count",
    "rx_throttle",
    "Buffer",
    "BufferCount",
    "Throttle",
    "DistinctUntilChanged",
    "to_nullable",
    "raises",
    "json_serializable",
    "json_deserialize",
    "json_serialize",
    "json_standard_serializable",
    "json_serialize_return",
    "json_serialize_return_list",
    "json_deserialize_list",
    "json_serialize_return_list",
    "chunk",
    "flatten",
    "flatten_deep",
    "uniq",
    "key_by",
    "pick",
    "omit",
    "head",
    "tail",
    "last",
    "extract_list_strict",
    "extract_non_null_list_strict",
    "repeat_value",
    "Timestamped",
    "rx_defer",
    "rx_distinct",
    "rx_element_at",
    "rx_empty",
    "rx_ignore_all",
    "rx_map_to",
    "rx_never",
    "rx_of_type",
    "rx_range",
    "rx_scan",
    "rx_tap",
    "rx_throw",
    "rx_timestamp",
    "Distinct",
    "ElementAt",
    "IgnoreAll",
    "MapTo",
    "Scan",
    "Tap",
    "Ignore",
    "TimestampOperator",
    "rx_debounce",
    "Debounce",
    "rx_combine_latest",
    "rx_zip",
]
