"""
Default configuration values for palantir-event-capture
"""

from ..models.captured_models import Severity, EventType, PipelineComponent

# Kafka Configuration
DEFAULT_KAFKA_BOOTSTRAP_SERVERS_RCA = "kafka01.prod.bt:9092,kafka02.prod.bt:9092,kafka03.prod.bt:9092,kafka04.prod.bt:9092"
DEFAULT_KAFKA_EVENT_TOPIC_RCA = "rca.events"
DEFAULT_KAFKA_ENABLED_RCA = True  # Disabled by default to avoid connection errors
DEFAULT_KAFKA_COMPRESSION_RCA = "gzip"
DEFAULT_KAFKA_BATCH_SIZE_RCA = 16384
DEFAULT_KAFKA_LINGER_MS_RCA = 10

# Logging Configuration
DEFAULT_LOG_LEVEL = "INFO"
DEFAULT_LOG_TO_CONSOLE = True
DEFAULT_LOG_FORMAT = (
    "<green>{time:YYYY-MM-DD HH:mm:ss}</green> | "
    "<level>{level: <8}</level> | "
    "<cyan>{name}</cyan>:<cyan>{function}</cyan> - "
    "<level>{message}</level>"
)

# Event Capture Settings
DEFAULT_SEND_TO_TRANSPORT = True
DEFAULT_COMPONENT = PipelineComponent.UNKNOWN
DEFAULT_SEVERITY = Severity.MEDIUM
DEFAULT_EVENT_TYPE = EventType.ERROR
DEFAULT_RERAISE = True
DEFAULT_ENABLE_STACK_TRACES = True
DEFAULT_MAX_STACK_TRACE_LENGTH = 5000  # characters
DEFAULT_USE_BACKGROUND_TRANSPORT = False

# Retry Configuration
DEFAULT_MAX_RETRIES = 3
DEFAULT_RETRY_DELAY = 1.0  # seconds
DEFAULT_RETRY_BACKOFF = 2.0  # multiplier
DEFAULT_CAPTURE_ALL_RETRIES = False  # Only capture final failure by default

# Performance Settings
DEFAULT_ASYNC_TRANSPORT = False
DEFAULT_EVENT_BATCH_SIZE = 100
DEFAULT_EVENT_QUEUE_SIZE = 1000

# Storage Configuration (optional)
DEFAULT_STORAGE_ENABLED = False
DEFAULT_STORAGE_PATH = "./event_logs"
DEFAULT_STORAGE_MAX_FILES = 100
DEFAULT_STORAGE_MAX_FILE_SIZE_MB = 10

# Security & Privacy
DEFAULT_SANITIZE_STACK_TRACES = False
DEFAULT_PII_PATTERNS = []  # Regex patterns to redact
DEFAULT_MAX_METADATA_SIZE = 10000  # characters

# Event Registry
DEFAULT_ID_REGISTRY_CLEANUP_INTERVAL = 3600  # seconds
DEFAULT_ID_REGISTRY_MAX_SIZE = 100000  # events