"""Miscellaneous helpers live here.

This module provides backward-compatible imports for all helpers.
The helpers are organized into submodules by functionality:
- dict_utils: Dictionary manipulation utilities
- file_utils: File handling utilities
- inventory: Inventory management utilities
- results: Result and testing helper classes
- misc: Miscellaneous helper functions
"""

# Dictionary utilities
from broker.helpers.dict_utils import (
    clean_dict,
    dict_from_paths,
    flatten_dict,
    merge_dicts,
)

# File handling utilities
from broker.helpers.file_utils import (
    FileLock,
    data_to_tempfile,
    load_file,
    resolve_file_args,
    save_file,
    temporary_tar,
    yaml,
    yaml_format,
)

# Git utilities
from broker.helpers.git import (
    GitHubAdapter,
    GitLabAdapter,
    RawHTTPAdapter,
    parse_source,
)

# Inventory utilities
from broker.helpers.inventory import (
    INVENTORY_LOCK,
    SPECIAL_INVENTORY_FIELDS,
    flip_provider_actions,
    get_host_action,
    inventory_fields_to_dict,
    load_inventory,
    update_inventory,
)

# Miscellaneous utilities
from broker.helpers.misc import (
    Emitter,
    dict_to_table,
    dictlist_to_table,
    emit,
    find_origin,
    fork_broker,
    handle_keyboardinterrupt,
    kwargs_from_click_ctx,
    resolve_nick,
    set_emit_file,
    simple_retry,
    translate_timeout,
    update_log_level,
)

# Result and testing classes
from broker.helpers.results import (
    FilterTest,
    MockStub,
    Result,
    eval_filter,
)

__all__ = [
    "INVENTORY_LOCK",
    "SPECIAL_INVENTORY_FIELDS",
    "Emitter",
    "FileLock",
    "FilterTest",
    "GitHubAdapter",
    "GitLabAdapter",
    "MockStub",
    "RawHTTPAdapter",
    "Result",
    "clean_dict",
    "data_to_tempfile",
    "dict_from_paths",
    "dict_to_table",
    "dictlist_to_table",
    "emit",
    "eval_filter",
    "find_origin",
    "flatten_dict",
    "flip_provider_actions",
    "fork_broker",
    "get_host_action",
    "handle_keyboardinterrupt",
    "inventory_fields_to_dict",
    "kwargs_from_click_ctx",
    "load_file",
    "load_inventory",
    "merge_dicts",
    "parse_source",
    "resolve_file_args",
    "resolve_nick",
    "save_file",
    "set_emit_file",
    "simple_retry",
    "temporary_tar",
    "translate_timeout",
    "update_inventory",
    "update_log_level",
    "yaml",
    "yaml_format",
]
