"""Router agregador del módulo Facturación (Diagrama 4). Prefijo ``/fin``."""

from fastapi import APIRouter, Depends

from api.v1.modules.core.permissions.dependencies import PermissionChecker

from . import permissions  # noqa: F401  (side-effect: registra permisos)
from .invoices.routes import router as invoices_router

# Enforcement por área/carril (R-T-07): se exige fin.access para el módulo.
router = APIRouter(dependencies=[Depends(PermissionChecker(["fin.access"]))])
router.include_router(invoices_router)
