"""
Customer event listener.

Listens for events that should trigger customer-side reactions.
Currently a stub — extend as notification and audit requirements are defined.
"""
import logging
from sqlalchemy.orm import Session

logger = logging.getLogger(__name__)


async def on_payment_request_authorized(db: Session, event_data: dict) -> None:
    """
    Reacts to payment_request.authorized events.
    Updates customer last_active_date (once column typo is fixed — HWCRM-104).
    """
    customer_id = event_data.get("customer_id")
    if not customer_id:
        return
    logger.info(f"payment_request.authorized received for customer {customer_id}")
    # TODO: extend when notification module is ready (HWNOT)
