"""
HRM Notification Templates.

تمپلیت‌های اطلاع‌رسانی ماژول HRM.
"""

NOTIFICATION_TEMPLATES = {
    # ── Employee ──
    "hrm.employee.hired": {
        "title": "استخدام کارمند جدید",
        "template": "کارمند {{ employee_name }} با کد {{ employee_code }} استخدام شد.",
        "channels": ["in_app", "email"],
        "recipients": ["hr_manager", "direct_manager"],
        "priority": "normal",
    },
    "hrm.employee.terminated": {
        "title": "خاتمه همکاری",
        "template": "همکاری {{ employee_name }} ({{ employee_code }}) خاتمه یافت.",
        "channels": ["in_app", "email"],
        "recipients": ["hr_manager", "direct_manager", "it_admin"],
        "priority": "high",
    },
    "hrm.employee.transferred": {
        "title": "انتقال کارمند",
        "template": "{{ employee_name }} به واحد {{ new_org_unit }} منتقل شد.",
        "channels": ["in_app"],
        "recipients": ["direct_manager", "new_manager"],
        "priority": "normal",
    },

    # ── Leave ──
    "hrm.leave.requested": {
        "title": "درخواست مرخصی",
        "template": "{{ employee_name }} درخواست {{ days_count }} روز مرخصی {{ leave_type }} از {{ start_date }} ثبت کرد.",
        "channels": ["in_app", "email"],
        "recipients": ["direct_manager"],
        "priority": "normal",
    },
    "hrm.leave.approved": {
        "title": "تأیید مرخصی",
        "template": "درخواست مرخصی شما از {{ start_date }} تا {{ end_date }} تأیید شد.",
        "channels": ["in_app", "email", "sms"],
        "recipients": ["employee"],
        "priority": "normal",
    },
    "hrm.leave.rejected": {
        "title": "رد مرخصی",
        "template": "درخواست مرخصی شما از {{ start_date }} رد شد. دلیل: {{ reason }}",
        "channels": ["in_app", "email"],
        "recipients": ["employee"],
        "priority": "normal",
    },

    # ── Timesheet ──
    "hrm.timesheet.submitted": {
        "title": "ارسال تایم‌شیت",
        "template": "تایم‌شیت {{ employee_name }} برای دوره {{ period_start }} تا {{ period_end }} ارسال شد.",
        "channels": ["in_app"],
        "recipients": ["direct_manager"],
        "priority": "normal",
    },
    "hrm.timesheet.approved": {
        "title": "تأیید تایم‌شیت",
        "template": "تایم‌شیت دوره {{ period_start }} تا {{ period_end }} تأیید شد.",
        "channels": ["in_app"],
        "recipients": ["employee"],
        "priority": "low",
    },

    # ── Payroll ──
    "hrm.salary.changed": {
        "title": "تغییر حقوق",
        "template": "حقوق {{ employee_name }} از تاریخ {{ effective_date }} تغییر یافت.",
        "channels": ["in_app"],
        "recipients": ["employee", "hr_manager"],
        "priority": "high",
    },

    # ── Attendance ──
    "hrm.attendance.absent": {
        "title": "غیبت",
        "template": "{{ employee_name }} در تاریخ {{ attendance_date }} غایب بوده است.",
        "channels": ["in_app", "email"],
        "recipients": ["direct_manager", "hr_specialist"],
        "priority": "normal",
    },
    "hrm.attendance.late": {
        "title": "تأخیر",
        "template": "{{ employee_name }} در تاریخ {{ attendance_date }} {{ late_minutes }} دقیقه تأخیر داشته است.",
        "channels": ["in_app"],
        "recipients": ["direct_manager"],
        "priority": "low",
    },

    # ── Document ──
    "hrm.document.expiring": {
        "title": "انقضای مدرک",
        "template": "مدرک {{ document_title }} کارمند {{ employee_name }} در {{ expiry_date }} منقضی می‌شود.",
        "channels": ["in_app", "email"],
        "recipients": ["employee", "hr_specialist"],
        "priority": "normal",
    },
}
