"""HR notification templates.

Templates are registered at app-startup (via apps.py ready()).
Subscribers that send these notifications live in events.py.
"""

from __future__ import annotations

from simorgh.apps.notifications.templates import NotificationTemplate, register_template

# ── Leave notifications ───────────────────────────────────────────────────

LEAVE_REQUESTED = register_template(
    NotificationTemplate(
        kind="hr.leave.requested",
        title_key="hr.notifications.leave_requested.title",
        body_key="hr.notifications.leave_requested.body",
        default_channels=("inbox",),
    )
)

LEAVE_APPROVED = register_template(
    NotificationTemplate(
        kind="hr.leave.approved",
        title_key="hr.notifications.leave_approved.title",
        body_key="hr.notifications.leave_approved.body",
        default_channels=("inbox",),
    )
)

LEAVE_REJECTED = register_template(
    NotificationTemplate(
        kind="hr.leave.rejected",
        title_key="hr.notifications.leave_rejected.title",
        body_key="hr.notifications.leave_rejected.body",
        default_channels=("inbox",),
    )
)

LEAVE_CANCELLED = register_template(
    NotificationTemplate(
        kind="hr.leave.cancelled",
        title_key="hr.notifications.leave_cancelled.title",
        body_key="hr.notifications.leave_cancelled.body",
        default_channels=("inbox",),
    )
)

# ── Employee notifications ────────────────────────────────────────────────

EMPLOYEE_HIRED = register_template(
    NotificationTemplate(
        kind="hr.employee.hired",
        title_key="hr.notifications.employee_hired.title",
        body_key="hr.notifications.employee_hired.body",
        default_channels=("inbox",),
    )
)

EMPLOYEE_TERMINATED = register_template(
    NotificationTemplate(
        kind="hr.employee.terminated",
        title_key="hr.notifications.employee_terminated.title",
        body_key="hr.notifications.employee_terminated.body",
        default_channels=("inbox",),
    )
)

# ── Document notifications ────────────────────────────────────────────────

DOCUMENT_EXPIRING_SOON = register_template(
    NotificationTemplate(
        kind="hr.document.expiring_soon",
        title_key="hr.notifications.document_expiring_soon.title",
        body_key="hr.notifications.document_expiring_soon.body",
        default_channels=("inbox",),
    )
)
