"""
Null Driver - discards OCPP events (no-op)
"""
import logging
from typing import Dict, Any, Optional

logger = logging.getLogger(__name__)


class NullDriver:
    """Null OCPP driver - discards events (no-op)"""
    
    def __init__(self):
        logger.info("Null driver initialized - discarding all events")
        
    async def log_event(self, event_type: str, data: Dict[str, Any], source: str) -> Optional[Dict[str, Any]]:
        """Discard an OCPP event (no-op)"""
        logger.debug(f"[NULL] Discarded {event_type} event from {source}")
        return {"status": "discarded", "event_type": event_type}
    
    async def send_message(self, charge_point_id: str, message: Dict[str, Any]) -> Optional[Dict[str, Any]]:
        """Send/log a message - compatibility method"""
        action = message.get("action", "Unknown")
        return {"status": "discarded", "action": action}
