"""Document exporters package.

This package provides a modular system for exporting research reports
to various document formats (PDF, ODT, LaTeX, etc.).

Example usage:
    from local_deep_research.exporters import ExporterRegistry, ExportOptions

    # Get an exporter
    exporter = ExporterRegistry.get_exporter("pdf")

    # Export content
    options = ExportOptions(title="My Research Report")
    result = exporter.export(markdown_content, options)

    # Use the result - content is available in memory as bytes
    # result.content contains the file bytes
    # result.filename is the suggested filename
    # result.mimetype is the MIME type for HTTP responses

Available formats can be queried with:
    ExporterRegistry.get_available_formats()
"""

from loguru import logger

from .base import BaseExporter, ExportOptions, ExportResult
from .registry import ExporterRegistry

# Import all exporters to trigger registration
# These imports must come after the base and registry imports
from . import latex_exporter  # noqa: F401
from . import odt_exporter  # noqa: F401

try:
    from . import pdf_exporter  # noqa: F401
except (ImportError, OSError):
    logger.warning(
        "PDF exporter could not be loaded — PDF export will be unavailable"
    )

from . import quarto_exporter  # noqa: F401
from . import ris_exporter  # noqa: F401

__all__ = [
    "BaseExporter",
    "ExportOptions",
    "ExportResult",
    "ExporterRegistry",
]
