from .interfaces import INotificationsTool
from .queue import Queues
from BTrees.OOBTree import OOBTree
from OFS.SimpleItem import SimpleItem
from Products.CMFCore.utils import UniqueObject
from zope.interface import implementer


@implementer(INotificationsTool)
class NotificationsTool(UniqueObject, SimpleItem, Queues):
    """Provide INetworkContainer as a site utility."""

    meta_type = "ploneintranet.notifications tool"
    id = "ploneintranet_notifications"

    def __init__(self, *args, **kwargs):
        self._digest_settings = OOBTree()
        self._notification_settings = OOBTree()
        return super().__init__(*args, **kwargs)
