"""DMS notification template definitions.

All DMS notification templates are registered here at import time.
This module is imported by ``DMSConfig.ready()`` so templates are
available before any handler attempts to dispatch.
"""

from __future__ import annotations

from simorgh.apps.notifications.templates import NotificationTemplate, register_template

# ---------------------------------------------------------------------------
# Mention
# ---------------------------------------------------------------------------

MENTION = register_template(
    NotificationTemplate(
        kind="dms.mention",
        title_key="dms.notifications.mention.title",
        body_key="dms.notifications.mention.body",
        default_channels=("inbox",),
    )
)

# ---------------------------------------------------------------------------
# Comment resolved
# ---------------------------------------------------------------------------

COMMENT_RESOLVED = register_template(
    NotificationTemplate(
        kind="dms.comment_resolved",
        title_key="dms.notifications.comment_resolved.title",
        body_key="dms.notifications.comment_resolved.body",
        default_channels=("inbox",),
    )
)

# ---------------------------------------------------------------------------
# Document lifecycle
# ---------------------------------------------------------------------------

DOCUMENT_PUBLISHED = register_template(
    NotificationTemplate(
        kind="dms.document_published",
        title_key="dms.notifications.document_published.title",
        body_key="dms.notifications.document_published.body",
        default_channels=("inbox",),
    )
)

DOCUMENT_SUBMITTED_FOR_REVIEW = register_template(
    NotificationTemplate(
        kind="dms.document_submitted_for_review",
        title_key="dms.notifications.document_submitted_for_review.title",
        body_key="dms.notifications.document_submitted_for_review.body",
        default_channels=("inbox",),
    )
)

DOCUMENT_ARCHIVED = register_template(
    NotificationTemplate(
        kind="dms.document_archived",
        title_key="dms.notifications.document_archived.title",
        body_key="dms.notifications.document_archived.body",
        default_channels=("inbox",),
    )
)

# ---------------------------------------------------------------------------
# Legal hold
# ---------------------------------------------------------------------------

HOLD_PLACED = register_template(
    NotificationTemplate(
        kind="dms.hold_placed",
        title_key="dms.notifications.hold_placed.title",
        body_key="dms.notifications.hold_placed.body",
        default_channels=("inbox",),
    )
)

# ---------------------------------------------------------------------------
# Checkout / lock
# ---------------------------------------------------------------------------

CHECKOUT_EXPIRED = register_template(
    NotificationTemplate(
        kind="dms.checkout_expired",
        title_key="dms.notifications.checkout_expired.title",
        body_key="dms.notifications.checkout_expired.body",
        default_channels=("inbox",),
    )
)

# ---------------------------------------------------------------------------
# Share link
# ---------------------------------------------------------------------------

SHARE_LINK_REVOKED = register_template(
    NotificationTemplate(
        kind="dms.share_link_revoked",
        title_key="dms.notifications.share_link_revoked.title",
        body_key="dms.notifications.share_link_revoked.body",
        default_channels=("inbox",),
    )
)
