"""
Tano Shield API Configuration
"""

from dataclasses import dataclass

# Default API configuration
DEFAULT_CONFIG = {
    'base_url': 'https://api.tanolabs.com',
    'timeout': 30,  # 30 seconds
    'version': 'v1',
}

def get_endpoints(base_url, version='v1'):
    """
    API endpoints
    
    Args:
        base_url (str): The base URL for the API
        version (str, optional): The API version. Defaults to 'v1'.
    
    Returns:
        dict: Object containing all API endpoints
    """
    api_base = f"{base_url}/api/{version}"
    
    return {
        # Credit system endpoints
        'CREDITS': f"{api_base}/credits",
        'CREDIT_LOGS': f"{api_base}/credits/logs",
        
        # API key management endpoints
        'API_KEYS': f"{api_base}/api-keys",
        'REVOKE_API_KEY': f"{api_base}/api-keys/revoke",
        'TOGGLE_API_KEY': f"{api_base}/api-keys/toggle",
        
        # Security endpoints
        'FIREWALL_CHECK': f"{api_base}/firewall-check",
        'PII_REDACTION': f"{api_base}/pii-redaction",
        'TEST_CORS': f"{api_base}/test-cors",
    }

@dataclass
class CreditConstants:
    """Credit constants for Tano Shield"""
    FREE_CREDITS_PER_MONTH: int = 1000
    FIREWALL_CHECK_COST: int = 1
    PII_REDACTION_COST: int = 1

# Create a singleton instance of CreditConstants
CREDIT_CONSTANTS = CreditConstants()