"""
Storm Logger project metadata and status information
"""

import json
from pathlib import Path
from typing import Dict, Any, List


def get_project_status() -> str:
    """
    Get current Storm Logger project status
    
    Returns:
        JSON string with project information
    """
    project_root = Path(__file__).parent.parent.parent
    
    # Simple project status info
    status = {
        "project": "Storm Logger",
        "version": "2.0.3",
        "description": "Enterprise-grade Python logging with business intelligence",
        "root_path": str(project_root),
        "modules": [
            "core",
            "console", 
            "integrations",
            "utils"
        ],
        "test_directories": [
            "tests/unit",
            "tests/integration",
            "tests/functional",
            "tests/performance",
            "tests/django_hooks",
            "tests/mcp"
        ]
    }
    
    return json.dumps(status, indent=2)


def get_project_metadata() -> Dict[str, Any]:
    """
    Get project metadata as a dictionary
    
    Returns:
        Dictionary with project metadata
    """
    return {
        "project": "Storm Logger",
        "version": "2.0.3",
        "description": "Enterprise-grade Python logging with business intelligence",
        "author": "Storm Development",
        "license": "GPL-2.0-only",
        "python_versions": ["3.10", "3.11", "3.12"],
        "dependencies": [
            "rich>=13.0.0",
            "colorama>=0.4.6",
            "typing-extensions>=4.0.0"
        ],
        "optional_dependencies": {
            "django": ["django>=3.2"],
            "enhanced": ["colorlog", "python-json-logger"],
            "security": ["cryptography"],
            "cloud": ["boto3", "azure-storage", "google-cloud-storage"],
            "performance": ["uvloop", "orjson"],
            "dev": ["pytest", "pytest-cov", "black", "ruff", "mypy"]
        }
    }


def get_module_structure() -> Dict[str, List[str]]:
    """
    Get the module structure of Storm Logger
    
    Returns:
        Dictionary mapping modules to their components
    """
    return {
        "core": [
            "logger.py",
            "handlers.py", 
            "formatters/",
            "interfaces.py"
        ],
        "console": [
            "storm_console.py",
            "themes.py",
            "formatters.py"
        ],
        "integrations": [
            "django/",
            "flask/",
            "fastapi/",
            "standalone.py"
        ],
        "utils": [
            "business_metrics.py",
            "sanitizer.py",
            "performance.py",
            "context_manager.py"
        ]
    }


def get_test_structure() -> Dict[str, List[str]]:
    """
    Get the test structure of Storm Logger
    
    Returns:
        Dictionary mapping test types to their directories
    """
    return {
        "unit": [
            "test_logger.py",
            "test_console.py",
            "test_formatters.py",
            "test_handlers.py",
            "test_sanitizer.py",
            "test_business_metrics.py"
        ],
        "integration": [
            "test_django_integration.py",
            "test_flask_integration.py",
            "test_standalone_integration.py"
        ],
        "functional": [
            "test_end_to_end.py",
            "test_business_workflows.py",
            "test_performance_scenarios.py"
        ],
        "performance": [
            "benchmarks.py",
            "memory_profiling.py",
            "concurrent_logging.py"
        ],
        "django_hooks": [
            "test_django_middleware.py",
            "test_django_signals.py",
            "test_django_management.py"
        ],
        "mcp": [
            "test_mcp_tools.py",
            "test_mcp_resources.py",
            "test_mcp_prompts.py"
        ]
    }