"""
PIF Compiler - Services Layer

This module contains business logic and external API integrations for
regulatory data sources used in cosmetic safety assessment.

Modules:
    - echa_find: ECHA dossier search functionality
    - echa_process: ECHA data extraction and processing (HTML -> Markdown -> JSON -> DataFrame)
    - echa_pdf: PDF generation from ECHA dossiers with Playwright
    - cosing_service: COSING database integration (EU cosmetic ingredients)
    - pubchem_service: PubChem API integration for chemical properties
    - common_log: Centralized logging configuration
"""

# ECHA Services
from pif_compiler.services.echa_find import (
    search_dossier,
)

from pif_compiler.services.echa_process import (
    echaExtract,
    echaExtract_multi,
    echaExtract_specific,
    echaExtract_local,
    echa_noael_ld50,
    echa_noael_ld50_multi,
    echaPage_to_md,
    openEchaPage,
    markdown_to_json_raw,
    clean_json,
    json_to_dataframe,
    filter_dataframe_by_dict,
)

from pif_compiler.services.echa_pdf import (
    generate_pdf_with_header_and_cleanup,
    search_generate_pdfs,
    svg_to_data_uri,
)

# COSING Service
from pif_compiler.services.cosing_service import (
    cosing_search,
    clean_cosing,
    parse_cas_numbers,
    identified_ingredients,
)

# PubChem Service
from pif_compiler.services.pubchem_service import (
    pubchem_dap,
    clean_property_data,
)

# Logging
from pif_compiler.services.common_log import (
    get_logger,
)

from pif_compiler.services.db_utils import get_client


__all__ = [
    # ECHA Find
    "search_dossier",
    # ECHA Process
    "echaExtract",
    "echaExtract_multi",
    "echaExtract_specific",
    "echaExtract_local",
    "echa_noael_ld50",
    "echa_noael_ld50_multi",
    "echaPage_to_md",
    "openEchaPage",
    "markdown_to_json_raw",
    "clean_json",
    "json_to_dataframe",
    "filter_dataframe_by_dict",
    # ECHA PDF
    "generate_pdf_with_header_and_cleanup",
    "search_generate_pdfs",
    "svg_to_data_uri",
    # COSING Service
    "cosing_search",
    "clean_cosing",
    "parse_cas_numbers",
    "identified_ingredients",
    # PubChem Service
    "pubchem_dap",
    "clean_property_data",
    # Logging
    "get_logger",
    "get_client"
]
