"""Module where all interfaces, events and exceptions live."""

from ploneintranet.core import _
from ploneintranet.layout.app import IApp
from zope.interface import Attribute
from zope.interface import Interface

# verbs definition
MUST_READ = "mustread"
TODO = "todo"


class ITodoApp(IApp):
    """Marker interface for the todo app"""


class IContentAction(Interface):
    """
    Interface for ContentAction class
    """

    userid = Attribute(_("The userid this action is for"))
    content_uid = Attribute(_("The UID of the content that needs actioning"))
    verb = Attribute(_("The action to be taken on the content"))
    created = Attribute(_("The datetime this ContentAction was created"))
    completed = Attribute(_("The datetime this ContentAction was completed"))
    modified = Attribute(_("The datetime this ContentAction was triggered"))


class IMilestoneNameResolver(Interface):
    """Interface for an adapter that resolves a milestone id into a name"""

    def resolve(milestone_id):
        """Given a mileston_id returns a name or an empty string
        if it cannot be resolved

        :param milestone_id: a milestone id
        :type milestone_id: str
        :return: The resolved milestone name or an empty string
        :rtype: str
        """
