"""Jail helpers to decouple service layer dependencies."""

from __future__ import annotations

from collections.abc import Sequence

from app.services.jail_service import reload_all


async def reload_jails(
    socket_path: str,
    include_jails: Sequence[str] | None = None,
    exclude_jails: Sequence[str] | None = None,
) -> None:
    """Reload fail2ban jails using shared jail service helper."""
    await reload_all(
        socket_path,
        include_jails=list(include_jails) if include_jails is not None else None,
        exclude_jails=list(exclude_jails) if exclude_jails is not None else None,
    )
