"""Top-level package exports.

`xmlsign` dependencies may not be installed in all environments during development.
We keep the import optional to avoid import-time failures.
"""

from .xmlgen.api import generate_de_xml, generate_event_xml
from .qrgen.api import add_qr_to_signed_de_xml

try:
    from .xmlsign.api import get_certificate_expiration, sign_de_xml, sign_event_xml
except ModuleNotFoundError:  # pragma: no cover
    get_certificate_expiration = None  # type: ignore[assignment]
    sign_de_xml = None  # type: ignore[assignment]
    sign_event_xml = None  # type: ignore[assignment]

from .workflow import generate_de_signed_qr_xml

__all__ = [
    "generate_de_xml",
    "generate_event_xml",
    "sign_de_xml",
    "sign_event_xml",
    "get_certificate_expiration",
    "add_qr_to_signed_de_xml",
    "generate_de_signed_qr_xml",
]
