"""
r4pm - Rust for process mining

Simple DataFram API
    - `df` with `import_xes`, `export_xes`, `import_ocel`, `import_ocel_pm4py`, etc.
    
Registry (for use with bindings):
    - import_item, convert_item, export_item
    - list_items, remove_item
    - item_to_df

Auto-generated bindings organized by module:
    - Import from r4pm.bindings
    - Submodules: bindings.discovery, bindings.core, etc.
"""

from .r4pm import (
    # Registry functions
    import_item,
    convert_item,
    export_item,
    item_to_df,
    list_items,
    remove_item,
    import_item_from_df,
    # Bindings introspection
    list_bindings,
    call_binding,
    # Low-level import/export (used internally)
    # import_xes_rs,
    # export_xes_rs,
    # import_ocel_xml_rs,
    # import_ocel_json_rs,
    __version__,
)

__all__ = [
    # XES import/export
    "xes_import",
    "xes_export",
    # OCEL import
    "import_ocel_xml",
    "import_ocel_xml_pm4py",
    "import_ocel_json",
    "import_ocel_json_pm4py",
    "rs_ocel_to_pm4py",
    # Registry
    "import_item",
    "convert_item",
    "export_item",
    "item_to_df",
    "list_items",
    "remove_item",
    "import_item_from_df",
    # Bindings introspection
    "list_bindings",
    "call_binding",
    # Low-level Rust functions
    # "import_xes_rs",
    # "export_xes_rs",
    # "import_ocel_xml_rs",
    # "import_ocel_json_rs",
    # DataFrame submodule
    "df",
    # Bindings submodule
    "bindings",
    "__version__",
]

from . import df
# Import bindings submodule (auto-generated by build.rs during cargo build)
try:
    from . import bindings
except ImportError:
    # Bindings not available - create a placeholder with helpful error
    class _BindingsNotGenerated:
        def __getattr__(self, name):
            raise ImportError(
                "Bindings not available. Rebuild with: maturin develop --release"
            )
    bindings = _BindingsNotGenerated()