"""
Defines the policies that can be applied to a workspace
"""

from collections import OrderedDict
from ploneintranet.core import _

JOIN_POLICY = OrderedDict(
    [
        ("admin", {"help": _("Only administrators can add workspace members.")}),
        (
            "team",
            {"help": _("Workspace members can add non-members as a workspace member.")},
        ),
    ]
)

PARTICIPANT_POLICY = OrderedDict(
    [
        (
            "consumers",
            {
                "title": _("Consume"),
                "help": _(
                    "People who have access to this workspace can read published "
                    "content. They cannot add, publish or edit any content."
                ),
            },
        ),
        (
            "producers",
            {
                "title": _("Produce"),
                "help": _(
                    "People who have access to this workspace can read published "
                    "content, add content and edit their own content. They cannot "
                    "publish any content."
                ),
            },
        ),
        (
            "publishers",
            {
                "title": _("Publish"),
                "help": _(
                    "People who have access to this workspace can read their own "
                    "drafts, add content and publish other people's submitted "
                    "content. They cannot edit other people's content."
                ),
            },
        ),
        (
            "moderators",
            {
                "title": _("Moderate"),
                "help": _(
                    "People who have access to this workspace can do everything: "
                    "read, add, publish and edit all content, including drafts."
                ),
            },
        ),
        (
            "guests",
            {
                "title": _("Guest"),
                "help": _("Guests are only used internally and cannot be assigned."),
                "exclude_from_ui": True,
            },
        ),
    ]
)
