"""Cross-provider helpers.

Provider modules at ``bot.payment_providers.<name>`` import the building
blocks they need from here. Nothing in this package depends on any
specific provider — it is the layer below them.
"""

from .callbacks import (
    PaymentCallbackParts,
    describe_payment,
    edit_or_answer,
    notify_callback_parse_error,
    notify_payment_gateway_failure,
    notify_payment_record_failure,
    notify_service_unavailable,
    parse_payment_callback,
    payment_link_message_text,
    quote_hwid_callback_parts,
    render_link_or_fail,
    render_payment_link,
    safe_callback_answer,
    safe_mark_failed_creation,
    safe_store_provider_payment_id,
)
from .common import (
    PaymentRecordAmounts,
    Translator,
    build_payment_description,
    build_payment_record_payload,
    create_base_payment_record,
    create_webapp_payment_record,
    decimal_amounts_equal,
    format_decimal_amount,
    format_human_units,
    format_number_for_payload,
    json_error,
    make_translator,
    mark_payment_failed_creation,
    parse_positive_int_units,
    payment_failed,
    payment_link_response,
    payment_record_amounts,
    payment_unavailable,
    payment_units_for_activation,
    sale_mode_base,
    sale_mode_is_hwid_devices,
    sale_mode_is_traffic,
    sale_mode_tariff_key,
)
from .http_client import (
    HttpClientMixin,
    SuccessCheck,
    first_value,
    http_ok,
    post_json_request,
)
from .success import (
    PaymentSuccessOutcome,
    PaymentSuccessRequest,
    SuccessMessage,
    append_hwid_renewal_note,
    build_success_message,
    finalize_successful_payment,
    is_traffic_sale_base,
    notify_admins_payment_received,
    resolve_inviter_name,
    resolve_user_language,
    send_success_message_to_user,
)
from .webapp import finalize_webapp_link_payment
from .webhooks import (
    coerce_payment_db_id,
    lookup_payment_by_order_or_provider_id,
    notify_user_payment_failed,
)

__all__ = [
    "HttpClientMixin",
    "PaymentCallbackParts",
    "PaymentRecordAmounts",
    "PaymentSuccessOutcome",
    "PaymentSuccessRequest",
    "SuccessCheck",
    "SuccessMessage",
    "Translator",
    "build_payment_description",
    "build_payment_record_payload",
    "build_success_message",
    "append_hwid_renewal_note",
    "coerce_payment_db_id",
    "create_base_payment_record",
    "create_webapp_payment_record",
    "decimal_amounts_equal",
    "describe_payment",
    "edit_or_answer",
    "finalize_successful_payment",
    "finalize_webapp_link_payment",
    "first_value",
    "format_decimal_amount",
    "format_human_units",
    "format_number_for_payload",
    "http_ok",
    "is_traffic_sale_base",
    "json_error",
    "lookup_payment_by_order_or_provider_id",
    "make_translator",
    "mark_payment_failed_creation",
    "parse_positive_int_units",
    "notify_admins_payment_received",
    "notify_callback_parse_error",
    "notify_payment_gateway_failure",
    "notify_payment_record_failure",
    "notify_service_unavailable",
    "notify_user_payment_failed",
    "parse_payment_callback",
    "payment_failed",
    "payment_link_message_text",
    "payment_link_response",
    "payment_record_amounts",
    "payment_units_for_activation",
    "payment_unavailable",
    "post_json_request",
    "quote_hwid_callback_parts",
    "render_link_or_fail",
    "render_payment_link",
    "resolve_inviter_name",
    "resolve_user_language",
    "safe_callback_answer",
    "safe_mark_failed_creation",
    "safe_store_provider_payment_id",
    "sale_mode_base",
    "sale_mode_is_hwid_devices",
    "sale_mode_is_traffic",
    "sale_mode_tariff_key",
    "send_success_message_to_user",
]
