"""Dash callback registrations for the Impakt web UI.

This package contains feature-specific callback modules. The
register_callbacks() function here is the single entry point
that registers all of them.
"""

from __future__ import annotations

import dash

from impakt.web.callbacks.channel_callbacks import register_channel_callbacks
from impakt.web.callbacks.corridor_callbacks import register_corridor_callbacks
from impakt.web.callbacks.criteria_callbacks import register_criteria_callbacks
from impakt.web.callbacks.cursor_callbacks import register_cursor_callbacks
from impakt.web.callbacks.export_callbacks import register_export_callbacks
from impakt.web.callbacks.file_callbacks import register_file_callbacks
from impakt.web.callbacks.math_callbacks import register_math_callbacks
from impakt.web.callbacks.plot_callbacks import register_plot_callbacks
from impakt.web.callbacks.template_callbacks import register_template_callbacks
from impakt.web.state import AppState


def register_callbacks(app: dash.Dash, app_state: AppState) -> None:
    """Register all callbacks from all feature modules."""
    register_channel_callbacks(app, app_state)
    register_plot_callbacks(app, app_state)
    register_cursor_callbacks(app, app_state)
    register_criteria_callbacks(app, app_state)
    register_file_callbacks(app, app_state)
    register_export_callbacks(app, app_state)
    register_template_callbacks(app, app_state)
    register_corridor_callbacks(app, app_state)
    register_math_callbacks(app, app_state)
