"""
LLM Redact - Privacy-first text redaction using local LLM models
"""

from llm_redact.client import LLMRedactClient
from llm_redact.config import get_settings, configure
from llm_redact.db.models import RedactionResult, RedactionRule
from llm_redact.client.mask import mask_text

# Simple API
_default_client = None


def mask(text: str, rules: list = None, model: str = None) -> RedactionResult:
    """
    Redact sensitive information from text using local LLM models.
    
    Args:
        text: The text to redact
        rules: Optional list of custom redaction rules
        model: Optional LLM model to use
        
    Returns:
        RedactionResult with redacted text and metadata
    """
    global _default_client
    if _default_client is None:
        _default_client = LLMRedactClient()
    
    return _default_client.mask(text, rules=rules, model=model)


def configure_client(**kwargs):
    """Configure the default client with custom settings"""
    global _default_client
    _default_client = LLMRedactClient(**kwargs)


__version__ = "0.1.0"
__all__ = [
    "mask",
    "configure_client", 
    "LLMRedactClient",
    "RedactionResult",
    "RedactionRule",
    "get_settings",
    "configure",
    "mask_text",
    "utils"
] 