"""Admin dashboard router — v2 schema aligned.

Powers a single HTML page that lets an operator:
  - list every site/target and flip `enabled`          (repositories.sites/targets)
  - trigger a one-shot crawl manually                  (pipeline.crawl_target, lazy import)
  - browse recent crawl_logs (timeline + retry)
  - search articles by site_code / target_code / keyword
  - see RAG ack state (exported_to_rag_at) + 24h stats

The module is a package — each `admin/<domain>.py` owns one slice of the API
(sites, targets, departments, articles, logs, …). They all register on the
shared `router` defined in `_common.py`. Importing those modules here triggers
their route registration before we re-export `router`.
"""
from __future__ import annotations

from ._common import DASHBOARD_HTML, _session, router

# Register routes by importing each domain module. Order is not significant.
from . import (  # noqa: E402,F401
    shell,
    sites,
    targets,
    discover_html,
    departments,
    articles,
    logs,
    attachments,
    adapters,
    registry,
    alerts,
    stats,
    jobs,
    audit,
)

__all__ = ["router", "_session", "DASHBOARD_HTML"]
