"""Content Engine — IAM permission registration."""

from __future__ import annotations

from simorgh.apps.iam.registry import register_permission

PERMISSIONS = [
    ("content.category.view",   "مشاهده دسته‌بندی‌های محتوا",     "View content categories"),
    ("content.category.manage", "مدیریت دسته‌بندی‌های محتوا",     "Create, update, delete content categories"),
    ("content.item.view",       "مشاهده آیتم‌های محتوا",         "View content items"),
    ("content.item.create",     "ایجاد آیتم محتوا",              "Create content items (drafts)"),
    ("content.item.update",     "ویرایش آیتم محتوا",             "Update content items"),
    ("content.item.publish",    "انتشار آیتم محتوا",             "Publish, archive, and manage content workflow"),
    ("content.item.delete",     "حذف آیتم محتوا",               "Soft-delete content items"),
    ("content.version.view",    "مشاهده نسخه‌های محتوا",         "View content version history"),
]


def register_all() -> None:
    for codename, label, description in PERMISSIONS:
        register_permission(codename, label=label, description=description)
